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