-->
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: Eager association loading
PostPosted: Mon Jun 20, 2005 11:06 pm 
Beginner
Beginner

Joined: Mon Jan 24, 2005 6:42 pm
Posts: 26
Hello,

I have a question regarding eager fetching an association in an object graph. I am not sure that posting all the config files will help my issue, but perhaps someone ran into this and has an explanation.

I have an association where object A is 1..n to object B, object B also has 5 many-to-one associations. My HQl looks similar to below:

from A a
left join fetch a.bs
left join fetch b.1
left join fetch b.2
left join fetch b.3
left join fetch b.4
left join fetch b.5
where some criteria

My issue is that for a set of objects A after query above is executed, some bs collections are initiazlied and some are not. I am not sure why.
By the way some objects A have items B in the database, some A's do not. What drives a collections being initialized?

THanks


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.