HHH-17019 EntityListener is not triggered for a LAZY loaded association
This commit is contained in:
parent
1b1ed23964
commit
35a671e64e
|
@ -505,10 +505,15 @@ public abstract class AbstractEntityInitializer extends AbstractFetchParentAcces
|
|||
final Object existingEntity = persistenceContext.getEntity( entityKey );
|
||||
if ( existingEntity != null ) {
|
||||
entityInstance = existingEntity;
|
||||
if ( existingLoadingEntry == null && isExistingEntityInitialized( existingEntity ) ) {
|
||||
this.isInitialized = true;
|
||||
registerReloadedEntity( rowProcessingState, existingEntity );
|
||||
notifyResolutionListeners( entityInstance );
|
||||
if ( existingLoadingEntry == null ) {
|
||||
if ( isExistingEntityInitialized( existingEntity ) ) {
|
||||
this.isInitialized = true;
|
||||
registerReloadedEntity( rowProcessingState, existingEntity );
|
||||
notifyResolutionListeners( entityInstance );
|
||||
}
|
||||
else {
|
||||
registerLoadingEntityInstanceFromExecutionContext( rowProcessingState, entityInstance );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( entityInstanceFromExecutionContext != null ) {
|
||||
|
|
Loading…
Reference in New Issue