File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -519,6 +519,10 @@ protected void resolveEntityInstance(
519
519
if ( Hibernate .isInitialized ( entityInstance ) ) {
520
520
this .isInitialized = true ;
521
521
registerReloadedEntity ( rowProcessingState , holder );
522
+ if ( rowProcessingState .getQueryOptions ().isResultCachingEnabled () == Boolean .TRUE ) {
523
+ // We need to read result set values to correctly populate the query cache
524
+ resolveState ( rowProcessingState );
525
+ }
522
526
}
523
527
}
524
528
}
@@ -532,7 +536,7 @@ protected void resolveEntityInstance(
532
536
registerReloadedEntity ( rowProcessingState , holder );
533
537
notifyResolutionListeners ( entityInstance );
534
538
if ( rowProcessingState .getQueryOptions ().isResultCachingEnabled () == Boolean .TRUE ) {
535
- // We still need to read result set values to correctly populate the query cache
539
+ // We need to read result set values to correctly populate the query cache
536
540
resolveState ( rowProcessingState );
537
541
}
538
542
}
You can’t perform that action at this time.
0 commit comments