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) {
829829
830830 private void applyQueryHints (Query query ) {
831831
832+ if (metadata == null ) {
833+ return ;
834+ }
835+
832836 getQueryHints ().withFetchGraphs (em ).forEach (query ::setHint );
833837
834838 if (metadata .getComment () != null && provider .getCommentHintKey () != null ) {
@@ -849,6 +853,10 @@ private <S> TypedQuery<S> applyRepositoryMethodMetadataForCount(TypedQuery<S> qu
849853
850854 private void applyQueryHintsForCount (Query query ) {
851855
856+ if (metadata == null ) {
857+ return ;
858+ }
859+
852860 getQueryHintsForCount ().forEach (query ::setHint );
853861
854862 if (metadata .getComment () != null && provider .getCommentHintKey () != null ) {
You can’t perform that action at this time.
0 commit comments