You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hibernate-reactive-core/src/main/java/org/hibernate/reactive/sql/results/graph/entity/internal/ReactiveEntityInitializerImpl.java
+25-15Lines changed: 25 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -216,7 +216,7 @@ else if ( lazyInitializer.isUninitialized() ) {
216
216
if ( data.getState() == State.INITIALIZED ) {
217
217
registerReloadedEntity( data );
218
218
resolveInstanceSubInitializers( data );
219
-
if ( rowProcessingState.needsResolveState() ) {
219
+
if ( data.getState() == State.INITIALIZED && rowProcessingState.needsResolveState() ) {
220
220
// We need to read result set values to correctly populate the query cache
221
221
resolveState( data );
222
222
}
@@ -336,6 +336,19 @@ public CompletionStage<Void> reactiveInitializeInstance(EntityInitializerData da
336
336
assertconsistentInstance( data );
337
337
returnreactiveInitializeEntityInstance( (ReactiveEntityInitializerData) data );
338
338
}
339
+
else {
340
+
if ( data.getRowProcessingState().needsResolveState() ) {
341
+
// A sub-initializer might have taken responsibility for this entity,
342
+
// but we still need to resolve the state to correctly populate a query cache
0 commit comments