Hi Hardy,
I took a look at this one (Yoann is part of my team at Open Wide so I'm directly concerned by this one).
{code:title=AnnotationMetadataProvider.java} // keep track of collection role names for ORM integration optimization based on collection update events if ( member.isCollection() ) { typeMetadataBuilder.addCollectionRole( StringHelper.qualify( parseContext.getCurrentClass().getName(), member.getName() ) ); } {code}
I discussed with Steve on IRC and he confirmed me that , in ORM, in the case of @MappedSuperClass, the collectionRole is going to be qualified with the first @Entity sub class and not with the @MappedSuperClass class.
The easy way to fix this would have been to tweak TypeMetadata.isSubRole to ignore the class name (as it's not really important considering we analyze the class hierarchy of a given class in the top down order) but as Steve reported it in http://markmail.org/thread/x7uc47t2unjnqrbw#query:+page:1+mid:vaegtp7siazugqur+state:results , it's not really possible to unqualify cleanly a path atm.
I'm wondering if we could collect the unqualified roles in the parseContext if the class is a MappedSuperClass and add them to the collectionRoles when we find the first @Entity in the way and qualify them with this entity?
WDYT?
|