HHH-16380 Avoid metamodel access when instantiating entity instances

This commit is contained in:
Marco Belladelli 2023-03-27 13:27:12 +02:00 committed by Christian Beikov
parent 8f321f670d
commit fff7f341b1
1 changed files with 1 additions and 1 deletions

View File

@ -659,7 +659,7 @@ public abstract class AbstractEntityInitializer extends AbstractFetchParentAcces
}
protected Object instantiateEntity(Object entityIdentifier, SharedSessionContractImplementor session) {
final Object instance = session.instantiate( concreteDescriptor.getEntityName(), entityKey.getIdentifier() );
final Object instance = session.instantiate( concreteDescriptor, entityKey.getIdentifier() );
if ( EntityLoadingLogging.DEBUG_ENABLED ) {
EntityLoadingLogging.ENTITY_LOADING_LOGGER.debugf(
"(%s) Created new entity instance [%s] : %s",