From 5cc638576fb825eb0fd0a6edf4c26211d6175159 Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Wed, 28 Oct 2009 18:03:10 +0000 Subject: [PATCH] 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 --- .../main/java/org/hibernate/ejb/metamodel/MetamodelImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entitymanager/src/main/java/org/hibernate/ejb/metamodel/MetamodelImpl.java b/entitymanager/src/main/java/org/hibernate/ejb/metamodel/MetamodelImpl.java index 2f9b56233b..68b7cd8280 100644 --- a/entitymanager/src/main/java/org/hibernate/ejb/metamodel/MetamodelImpl.java +++ b/entitymanager/src/main/java/org/hibernate/ejb/metamodel/MetamodelImpl.java @@ -57,7 +57,10 @@ public class MetamodelImpl implements Metamodel, Serializable { SessionFactoryImplementor sessionFactory) { MetadataContext context = new MetadataContext( sessionFactory ); while ( persistentClasses.hasNext() ) { - locateOrBuildEntityType( persistentClasses.next(), context ); + PersistentClass pc = persistentClasses.next(); + if ( pc.getMappedClass() != null ) { + locateOrBuildEntityType( pc, context ); + } } context.wrapUp(); return new MetamodelImpl( context.getEntityTypeMap(), context.getEmbeddableTypeMap() );