The object structure is like below-
Entity A
- Collection <B>
Entity B
- Collection <C>
Entity C
-Collection <D>
Entity D
CompositePrimaryKey
Class CompositePrimaryKey
String id;
In the HQL, the query is like from A a where a.B.C.D.CompositePrimaryKey.id = 'input';
I am getting the below exception-
org.hibernate.QueryException: illegal attempt to dereference collection
Basically this is implicit join across the collections. What is the right approach to do this?
I want to fetch all data through the collections - based on the id value
Thank you.