HHH-16350 Pass correct state to pre-load events
This commit is contained in:
parent
ab91f08ad8
commit
bddfa7c5c6
|
@ -705,8 +705,6 @@ public abstract class AbstractEntityInitializer extends AbstractFetchParentAcces
|
|||
@Override
|
||||
public void initializeInstance(RowProcessingState rowProcessingState) {
|
||||
if ( !missing && !isInitialized ) {
|
||||
preLoad( rowProcessingState );
|
||||
|
||||
final LazyInitializer lazyInitializer = extractLazyInitializer( entityInstance );
|
||||
final SharedSessionContractImplementor session = rowProcessingState.getSession();
|
||||
final PersistenceContext persistenceContext = session.getPersistenceContextInternal();
|
||||
|
@ -798,6 +796,8 @@ public abstract class AbstractEntityInitializer extends AbstractFetchParentAcces
|
|||
|
||||
resolvedEntityState = extractConcreteTypeStateValues( rowProcessingState );
|
||||
|
||||
preLoad( rowProcessingState );
|
||||
|
||||
if ( isPersistentAttributeInterceptable(toInitialize) ) {
|
||||
PersistentAttributeInterceptor persistentAttributeInterceptor =
|
||||
asPersistentAttributeInterceptable( toInitialize ).$$_hibernate_getInterceptor();
|
||||
|
@ -1076,6 +1076,7 @@ public abstract class AbstractEntityInitializer extends AbstractFetchParentAcces
|
|||
preLoadEvent.reset();
|
||||
|
||||
preLoadEvent.setEntity( entityInstance )
|
||||
.setState( resolvedEntityState )
|
||||
.setId( entityKey.getIdentifier() )
|
||||
.setPersister( concreteDescriptor );
|
||||
|
||||
|
|
Loading…
Reference in New Issue