Hello,
I have a question on how to create a query in Hibernate that properly resolves a subclass.
Lets say I have 4 classes: A, B, B2 and C with the following relationships:
B2 is a subclass of B.
A has a many-to-one association to a B
B2 has a one-to-one association to a C
I need to create a query that goes for A, then uses the association to B to get ONLY B2 objects, then across the association from B2 to its C.
The thing I don't understand is how to "cast" the B to be a B2. Is there something in HQL that supports this type of query?
Thanks!