Fix issue with getMetamodel() called before its initialization

This commit is contained in:
Andrea Boriero 2016-04-28 15:40:56 +01:00 committed by Steve Ebersole
parent 4f72bd0cef
commit da4ee5bbac
1 changed files with 3 additions and 5 deletions

View File

@ -282,16 +282,14 @@ public final class SessionFactoryImpl implements SessionFactoryImplementor {
identifierGenerators.put( model.getEntityName(), generator );
} );
//Named Queries:
this.namedQueryRepository = metadata.buildNamedQueryRepository( this );
LOG.debug( "Instantiated session factory" );
this.metamodel = new MetamodelImpl( this );
this.metamodel.initialize( metadata, determineJpaMetaModelPopulationSetting( properties ) );
//Named Queries:
this.namedQueryRepository = metadata.buildNamedQueryRepository( this );
settings.getMultiTableBulkIdStrategy().prepare(
jdbcServices,
buildLocalConnectionAccess(),