File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -506,6 +506,14 @@ protected void resolveEntityInstance(
506
506
}
507
507
else {
508
508
entityInstance = proxy ;
509
+ if ( Hibernate .isInitialized ( entityInstance ) ) {
510
+ this .isInitialized = true ;
511
+ registerReloadedEntity ( rowProcessingState , entityInstance );
512
+ if ( rowProcessingState .getQueryOptions ().isResultCachingEnabled () == Boolean .TRUE ) {
513
+ // We need to read result set values to correctly populate the query cache
514
+ resolveState ( rowProcessingState );
515
+ }
516
+ }
509
517
}
510
518
}
511
519
else {
@@ -518,7 +526,7 @@ protected void resolveEntityInstance(
518
526
registerReloadedEntity ( rowProcessingState , existingEntity );
519
527
notifyResolutionListeners ( entityInstance );
520
528
if ( rowProcessingState .getQueryOptions ().isResultCachingEnabled () == Boolean .TRUE ) {
521
- // We still need to read result set values to correctly populate the query cache
529
+ // We need to read result set values to correctly populate the query cache
522
530
resolveState ( rowProcessingState );
523
531
}
524
532
}
You can’t perform that action at this time.
0 commit comments