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 @@ -832,6 +832,10 @@ private <S> TypedQuery<S> applyRepositoryMethodMetadata(TypedQuery<S> query) {
832832
833833 private void applyQueryHints (Query query ) {
834834
835+ if (metadata == null ) {
836+ return ;
837+ }
838+
835839 getQueryHints ().withFetchGraphs (em ).forEach (query ::setHint );
836840
837841 if (metadata .getComment () != null && provider .getCommentHintKey () != null ) {
@@ -852,6 +856,10 @@ private <S> TypedQuery<S> applyRepositoryMethodMetadataForCount(TypedQuery<S> qu
852856
853857 private void applyQueryHintsForCount (Query query ) {
854858
859+ if (metadata == null ) {
860+ return ;
861+ }
862+
855863 getQueryHintsForCount ().forEach (query ::setHint );
856864
857865 if (metadata .getComment () != null && provider .getCommentHintKey () != null ) {
You can’t perform that action at this time.
0 commit comments