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