Using: JPA 2 with hibernate
Stacktrace:
java.lang.IllegalArgumentException: Illegal attempt to dereference path source [null]
at org.hibernate.ejb.criteria.path.AbstractPathImpl.illegalDereference(AbstractPathImpl.java:104)
at org.hibernate.ejb.criteria.path.AbstractPathImpl.get(AbstractPathImpl.java:186)
Cause:
I was doing a get on a PluralAttributePath
initial code:
Root
Path
path = path.get("description"); //throws exception since Ordelines was a many to many join
new code:
Root
Join
Path
path = join.get("description");
helped a lot!
BeantwoordenVerwijderenregistered a improvement by considering what should be an implicit join.
https://hibernate.onjira.com/browse/HHH-7892#comment-49279