Hi,
What is the exact algorithm for fetch=subselect? I searched through the manual and javadoc but the explanations are quite vague.
I have a "Node.translations" one-to-many relationship defined with fetch=subselect.
i fetch a lot of nodes in one session using a lot of Restrictions.in(id,nodeIds) criterias.
When I then access the relation "Node.translations" on one of the nodes for the first time after my queries, The subselect fetches "Node.translations" for some other nodes but not for all.
For the other nodes, when i try to access the association, it fetches the association one by one, resulting in N+1 performance issue.
Can someone explain to me exacly wich objects it chooses to inilialize, and how to make it initialize all the associations?
Thanks in advance
Antoine
|