I have an entity which extends from @MappedSuperClass. In parent class I have @ManyToMany mapping via @JoinTable. When I access this attribute via Criteria building builder 's Path via
{code:java} path.get( manyToManyAttribute "manyToManyAttributeName" ); {code}
I get an exception
{code:java} ERROR org.hibernate.AssertionFailure - HHH000099: an assertion failure occurred (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): org.hibernate.AssertionFailure: Unexpected BindableType; expected [ENTITY_TYPE]; instead got [PLURAL_ATTRIBUTE] org.hibernate.AssertionFailure: Unexpected BindableType; expected [ENTITY_TYPE]; instead got [PLURAL_ATTRIBUTE] at org.hibernate.query.criteria.internal.path.PluralAttributePath.resolveRole(PluralAttributePath.java:66) at org.hibernate.query.criteria.internal.path.PluralAttributePath.resolvePersister(PluralAttributePath.java:46) at org.hibernate.query.criteria.internal.path.PluralAttributePath.<init>(PluralAttributePath.java:41) at org.hibernate.query.criteria.internal.path.AbstractPathImpl.get(AbstractPathImpl.java:149) at org.hibernate.query.criteria.internal.path.AbstractPathImpl.get(AbstractPathImpl.java:185) {code}
If I move this property to child class everything works. |
|