File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -829,6 +829,10 @@ private <S> TypedQuery<S> applyRepositoryMethodMetadata(TypedQuery<S> query) {
829
829
830
830
private void applyQueryHints (Query query ) {
831
831
832
+ if (metadata == null ) {
833
+ return ;
834
+ }
835
+
832
836
getQueryHints ().withFetchGraphs (em ).forEach (query ::setHint );
833
837
834
838
if (metadata .getComment () != null && provider .getCommentHintKey () != null ) {
@@ -849,6 +853,10 @@ private <S> TypedQuery<S> applyRepositoryMethodMetadataForCount(TypedQuery<S> qu
849
853
850
854
private void applyQueryHintsForCount (Query query ) {
851
855
856
+ if (metadata == null ) {
857
+ return ;
858
+ }
859
+
852
860
getQueryHintsForCount ().forEach (query ::setHint );
853
861
854
862
if (metadata .getComment () != null && provider .getCommentHintKey () != null ) {
You can’t perform that action at this time.
0 commit comments