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