having more than one fetch per query would be VERY usefull.. for our uses we would mark EVERYTHING either lazy or proxy, then based on use case "fetch" the proper portions of the graph.
I would also like to see some variation on fetch profiles that could be used in conjuction with HQL. maby "named" profiles defined in the mapping files that could be used within the queries:
mapping:
Code:
<fetchprofile name="cat_kittens_and_mate" class="eg.Cat">
<collection-fetch property="kittens"/>
<property-fetch property="mate"/>
</fetchprofile>
query:
Code:
select cat from eg.Cat cat where cat.something=value using fetch profile cat_kittens_and_mate
This would allow the system archetects to define what are acceptable fetch profiles and application developers would just use one of the predefined fetch profiles