Skip to content

Commit

Permalink
SAK-44394 Rubrics Disable ToolItemRubricAssociation query cache (saka…
Browse files Browse the repository at this point in the history
  • Loading branch information
ern authored Oct 27, 2020
1 parent 1fcbfd5 commit 6e6b7bf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ public interface ToolItemRubricAssociationRepository extends MetadataRepository<

@RestResource(path = "by-tool-item-ids", rel = "by-tool-item-ids")
@Query("select resource from ToolItemRubricAssociation resource where resource.toolId = :toolId and resource.itemId = :itemId and " + QUERY_CONTEXT_CONSTRAINT)
@QueryHints(@QueryHint(name="org.hibernate.cacheable", value = "true"))
// @QueryHints(@QueryHint(name="org.hibernate.cacheable", value = "true"))
List<ToolItemRubricAssociation> findByToolIdAndItemId(@Param("toolId") String toolId, @Param("itemId") String itemId);

@RestResource(path = "by-rubric-id", rel = "by-rubric-id")
@Query("select resource from ToolItemRubricAssociation resource where resource.rubricId = :rubricId ") //and " + QUERY_CONTEXT_CONSTRAINT)
@QueryHints(@QueryHint(name="org.hibernate.cacheable", value = "true"))
// @QueryHints(@QueryHint(name="org.hibernate.cacheable", value = "true"))
List<ToolItemRubricAssociation> findByRubricId(@Param("rubricId") Long rubricId);

@RestResource(path = "by-item-id-prefix", rel = "by-item-id-prefix")
@Query("select resource from ToolItemRubricAssociation resource where resource.toolId = :toolId and resource.itemId like CONCAT(:itemId, '%') and " + QUERY_CONTEXT_CONSTRAINT)
@QueryHints(@QueryHint(name="org.hibernate.cacheable", value = "true"))
// @QueryHints(@QueryHint(name="org.hibernate.cacheable", value = "true"))
List<ToolItemRubricAssociation> findByItemIdPrefix(@Param("toolId") String toolId, @Param("itemId") String itemId);
}

0 comments on commit 6e6b7bf

Please sign in to comment.