test is org.hibernate.jpa.test.metadata.MetadataTest and root class is 
org.hibernate.jpa.test.metadata.Thing

basically here is a hierarchy like :


Entity ->  MappedSuperclass -> Entity -> MappedSuperclass -> Object (//not an 
entity but in between mapped superclass and entity) -> MappedSuperclass

in the metamodel branch 
org.hibernate.metamodel.internal.source.annotations.util.EntityHierarchyBuilder#processHierarchy

if ( !isEntityClass( subClassInfo ) ) {
                                if ( JandexHelper.containsSingleAnnotation( 
subClassInfo, JPADotNames.EMBEDDABLE ) ) {
                                        throw new AnnotationException( "An 
embeddable cannot extend an entity: " + subClassInfo );
                                }
                                if ( JandexHelper.containsSingleAnnotation( 
subClassInfo, JPADotNames.MAPPED_SUPERCLASS ) ) {
                                        throw new AnnotationException( "A 
mapped superclass cannot extend an entity: " + subClassInfo );
                                }
                                continue;
                        }

-------------------------
Best Regards,

Strong Liu <stliu at hibernate.org>
http://about.me/stliu/bio



_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to