Skip to content

Commit 811d0e8

Browse files
committed
HHH-19476 claimEntityHolderIfPossible Assertion Error
1 parent 89aab0d commit 811d0e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ else if ( lazyInitializer.isUninitialized() ) {
959959
? entityDescriptor
960960
: determineConcreteEntityDescriptor( rowProcessingState, discriminatorAssembler, entityDescriptor );
961961
assert data.concreteDescriptor != null;
962-
resolveEntityKey( data, lazyInitializer.getIdentifier() );
962+
resolveEntityKey( data, lazyInitializer.getInternalIdentifier() );
963963
data.entityHolder = persistenceContext.claimEntityHolderIfPossible(
964964
data.entityKey,
965965
null,
@@ -974,7 +974,7 @@ else if ( lazyInitializer.isUninitialized() ) {
974974
else {
975975
data.entityInstanceForNotify = lazyInitializer.getImplementation();
976976
data.concreteDescriptor = session.getEntityPersister( null, data.entityInstanceForNotify );
977-
resolveEntityKey( data, lazyInitializer.getIdentifier() );
977+
resolveEntityKey( data, lazyInitializer.getInternalIdentifier() );
978978
data.entityHolder = persistenceContext.getEntityHolder( data.entityKey );
979979
// Even though the lazyInitializer reports it is initialized, check if the entity holder reports initialized,
980980
// because in a nested initialization scenario, this nested initializer must initialize the entity

0 commit comments

Comments
 (0)