Hi,
I think the code is wrong. The test setup seems correct. The spec does not really rule
this case out.
I did not think about this case when writing the code below.
--Hardy
On 2 Jan 2013, at 7:11 AM, Strong Liu <stliu(a)hibernate.org> wrote:
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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev