I have an entity \[A] which extends from @MappedSuperClass \[B]. In parent class \[B] I have @ManyToMany mapping via @JoinTable. I have a class \[C] which has @OneToMany relationship with entity A. When I access this attribute via Criteria builder's Path via
{code:java}Croot.get("oneToManyAttribute " ).get("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 \[A] everything works.
|
|