-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How does exactly subselect fetching work? Help!No doc found!
PostPosted: Thu Feb 21, 2008 5:55 am 
Newbie

Joined: Fri Mar 24, 2006 1:20 pm
Posts: 7
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.