HHH-4202 : Fix to only build an EntityType for PersistentClasses with a mapped class
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17870 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
6d5de2b0af
commit
5cc638576f
|
@ -57,7 +57,10 @@ public class MetamodelImpl implements Metamodel, Serializable {
|
||||||
SessionFactoryImplementor sessionFactory) {
|
SessionFactoryImplementor sessionFactory) {
|
||||||
MetadataContext context = new MetadataContext( sessionFactory );
|
MetadataContext context = new MetadataContext( sessionFactory );
|
||||||
while ( persistentClasses.hasNext() ) {
|
while ( persistentClasses.hasNext() ) {
|
||||||
locateOrBuildEntityType( persistentClasses.next(), context );
|
PersistentClass pc = persistentClasses.next();
|
||||||
|
if ( pc.getMappedClass() != null ) {
|
||||||
|
locateOrBuildEntityType( pc, context );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
context.wrapUp();
|
context.wrapUp();
|
||||||
return new MetamodelImpl( context.getEntityTypeMap(), context.getEmbeddableTypeMap() );
|
return new MetamodelImpl( context.getEntityTypeMap(), context.getEmbeddableTypeMap() );
|
||||||
|
|
Loading…
Reference in New Issue