Hibernate version: 3.0.5
Hi,
My entity has an association that I wish to be lazy as default, so in the mapping file no eager fetching is set for this association.
But, I have a query (using HQL) that wants to load everything and I want to specify eager fetching for that query only.
Join won’t help me much, since the association is for the same table (we’re implementing a tree), so I need subselect.
What is the syntax in HQL?
I tried looking at Criteria, but the only FetchModes available are SELECT and JOIN. Why isn’t there a SUBSELECT in the class FetchMode? How can I do it?
Thanks,
avigail.
|