Issue Type: Bug Bug
Affects Versions: 4.1.4
Assignee: Unassigned
Components: metamodel
Created: 01/Mar/13 4:44 AM
Description:

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.

Environment: Hibernate 4.1.4, H2 database
Project: Hibernate ORM
Labels: criteria metamodel
Priority: Major Major
Reporter: Dennis Wagelaar
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira