-->
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.  [ 2 posts ] 
Author Message
 Post subject: child collection not initialized because no records in db
PostPosted: Tue May 24, 2005 5:06 am 
Newbie

Joined: Wed Oct 29, 2003 1:29 am
Posts: 5
I use an HQL like this:

From Parent p left join fetch p.children

The issue is that when a parent does not have any children in the database, the collection of children remains uninitialized.

Then I have to loop on the resultant parents and initialize the children collections one by one, which issues unnecessary db requests.

I have searched all through the forum and read a lot in Hibernate in action and the hibernate reference. but I have no clue for this.

Any ideas ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 24, 2005 5:33 am 
Newbie

Joined: Wed Oct 29, 2003 1:29 am
Posts: 5
I use Hibernate 3.02


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

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.