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 c2a3bd3b48
commit 055aeba6b9
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) { 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 ) { if ( EntityLoadingLogging.DEBUG_ENABLED ) {
EntityLoadingLogging.ENTITY_LOADING_LOGGER.debugf( EntityLoadingLogging.ENTITY_LOADING_LOGGER.debugf(
"(%s) Created new entity instance [%s] : %s", "(%s) Created new entity instance [%s] : %s",