org.hibernate.ejb.metamodel.AbstractManagedType.getSet(String, Class<E>) uses getSupertype().getPluralAttribute( name ) to retrieve inherited attributes. However, the body of getPluralAttribute() looks like this:
private PluralAttribute<? super X, ?, ?> getPluralAttribute(String name) {
return declaredPluralAttributes.get( name );
}
So, no recursive lookup of inherited attributes, but only up to the first supertype. When the Set attribute is inherited from further up, it can no longer be found. I've had to use getAttribute(name) with a typecast instead of getSet() to work around this problem, as getAttribute(name) implements proper recursion.
|