Hello all,
I use eager/aggressive loading, using outer join fetch, for better performance.
I am not sure how to construct a HQL query to do eager/aggressive loading for the hierarchy shown below.
B is the base class.
D1 and D2 are derived classes.
D2 is associated with class S.
Class X is associated with B.
I would like to aggressively load X, B, D1, D2 and S.
The query I have aggressively loads everything except S. Here is what I have:
FROM X left join fetch X.B
I am not sure how to aggressively load S which is associated with subclass D2. Any suggestions will be very helpful.
thanks,
Raj.
|