HHH-10837 - with jpaMetaModelPopulationSetting.DISABLED the MetadataContext is not created
This commit is contained in:
parent
248d9cca14
commit
1558eb73a6
|
@ -205,17 +205,18 @@ public class MetamodelImpl implements MetamodelImplementor, Serializable {
|
|||
}
|
||||
collectionPersisterMap.values().forEach( CollectionPersister::postInstantiate );
|
||||
|
||||
if ( jpaMetaModelPopulationSetting != JpaMetaModelPopulationSetting.DISABLED ) {
|
||||
MetadataContext context = new MetadataContext(
|
||||
sessionFactory,
|
||||
mappingMetadata.getMappedSuperclassMappingsCopy(),
|
||||
jpaMetaModelPopulationSetting
|
||||
);
|
||||
if ( jpaMetaModelPopulationSetting != JpaMetaModelPopulationSetting.DISABLED ) {
|
||||
|
||||
for ( PersistentClass entityBinding : mappingMetadata.getEntityBindings() ) {
|
||||
locateOrBuildEntityType( entityBinding, context );
|
||||
}
|
||||
handleUnusedMappedSuperclasses( context );
|
||||
}
|
||||
|
||||
context.wrapUp();
|
||||
|
||||
this.jpaEntityTypeMap.putAll( context.getEntityTypeMap() );
|
||||
|
@ -224,6 +225,7 @@ public class MetamodelImpl implements MetamodelImplementor, Serializable {
|
|||
this.jpaEntityTypesByEntityName.putAll( context.getEntityTypesByEntityName() );
|
||||
|
||||
applyNamedEntityGraphs( mappingMetadata.getNamedEntityGraphs().values() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue