[hibernate-dev] problems with using jandex on metamodel
Hi There We know that to use Jandex annotation repository, we have to add annotation classes to the Indexer explicitly first, and this already force us to list all MappedSuperClass and Embeddable classes which was not required. Now I"m trying to migrate the HEM to metamodel branch and most tests are failing due to this limitation , like jpa callback listeners and tests using not-completed orm.xml well, this probably not a problem when using hibernate within a container, but SE environment, we have two options I see: 1. ask users to list all annotation classes, which will be a big migration issue and also bad usability 2. try to load the class using ClassLoadingService if it can not be found in the Index repository and build a new one with CompositeIndex wdty? - Best Regards, Strong Liu http://about.me/stliu/bio ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] can a mapped super class extends from an entity?
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 http://about.me/stliu/bio ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev