HHH-11655 : SessionImpl does not load EntityPersister by entity name

This commit is contained in:
Gail Badner 2017-09-08 00:05:28 -07:00
parent 97e7dc59e6
commit 0ddc7d32ad
1 changed files with 1 additions and 1 deletions

View File

@ -2024,7 +2024,7 @@ public final class SessionImpl
if ( entityName == null ) {
throw new IllegalArgumentException( "Could not resolve entity-name [" + object + "]" );
}
getSessionFactory().getMetamodel().entityPersister( object.getClass() );
getSessionFactory().getMetamodel().entityPersister( entityName );
}
catch (HibernateException e) {
throw new IllegalArgumentException( "Not an entity [" + object.getClass() + "]", e );