Skip to content

Commit

Permalink
HHH-17019 EntityListener is not triggered for a LAZY loaded association
Browse files Browse the repository at this point in the history
  • Loading branch information
dreab8 committed Aug 3, 2023
1 parent 1b1ed23 commit 35a671e
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -505,10 +505,15 @@ protected void resolveEntityInstance(
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 ) {
Expand Down

0 comments on commit 35a671e

Please sign in to comment.