We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef662f2 commit 0348c68Copy full SHA for 0348c68
spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java
@@ -304,7 +304,7 @@ public Optional<T> findById(ID id) {
304
305
getQueryHints().withFetchGraphs(em).forEach(hints::put);
306
307
- if (metadata.getComment() != null && provider.getCommentHintKey() != null) {
+ if (metadata != null && metadata.getComment() != null && provider.getCommentHintKey() != null) {
308
hints.put(provider.getCommentHintKey(), provider.getCommentHintValue(metadata.getComment()));
309
}
310
0 commit comments