HHH-17329 Resolve state for query cache for initialized proxies
This commit is contained in:
parent
1737ee457d
commit
d3674186bf
|
@ -519,6 +519,10 @@ public abstract class AbstractEntityInitializer extends AbstractFetchParentAcces
|
||||||
if ( Hibernate.isInitialized( entityInstance ) ) {
|
if ( Hibernate.isInitialized( entityInstance ) ) {
|
||||||
this.isInitialized = true;
|
this.isInitialized = true;
|
||||||
registerReloadedEntity( rowProcessingState, holder );
|
registerReloadedEntity( rowProcessingState, holder );
|
||||||
|
if ( rowProcessingState.getQueryOptions().isResultCachingEnabled() == Boolean.TRUE ) {
|
||||||
|
// We need to read result set values to correctly populate the query cache
|
||||||
|
resolveState( rowProcessingState );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -532,7 +536,7 @@ public abstract class AbstractEntityInitializer extends AbstractFetchParentAcces
|
||||||
registerReloadedEntity( rowProcessingState, holder );
|
registerReloadedEntity( rowProcessingState, holder );
|
||||||
notifyResolutionListeners( entityInstance );
|
notifyResolutionListeners( entityInstance );
|
||||||
if ( rowProcessingState.getQueryOptions().isResultCachingEnabled() == Boolean.TRUE ) {
|
if ( rowProcessingState.getQueryOptions().isResultCachingEnabled() == Boolean.TRUE ) {
|
||||||
// We still need to read result set values to correctly populate the query cache
|
// We need to read result set values to correctly populate the query cache
|
||||||
resolveState( rowProcessingState );
|
resolveState( rowProcessingState );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue