Skip to content

Commit 6c025f9

Browse files
committed
HHH-18085 Also remove loading holder when loading shallow cached entity
1 parent e1f4bf6 commit 6c025f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/AbstractEntityInitializer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ protected Object resolveEntityInstance(Object entityIdentifier, RowProcessingSta
664664
assert isOwningInitializer;
665665
// If this initializer owns the entity, we have to remove the entity holder,
666666
// because the subsequent loading process will claim the entity
667+
rowProcessingState.getJdbcValuesSourceProcessingState().getLoadingEntityHolders().remove( holder );
667668
session.getPersistenceContextInternal().removeEntityHolder( entityKey );
668669
return session.internalLoad(
669670
concreteDescriptor.getEntityName(),

0 commit comments

Comments
 (0)