Hi Ondra,
in HQL queries, you can use the "left join fetch" construct to specify that you want to eagerly fetch some association, independently of what is specified in the mapping file. E.g. you could issue the following query to eagerly fetch the "children" collection of a Person:
Code:
from Person p left join fetch p.children where p.id in (:ids)
Is this what you're looking for?
However, I don't know any way to change the fetching strategies when you are not using HQL but methods like Session#get and Session#load in which case only the settings in the mapping file are honoured.