-->
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.  [ 3 posts ] 
Author Message
 Post subject: problems w/ lazy fetching
PostPosted: Wed Aug 17, 2005 3:18 pm 
Newbie

Joined: Wed Aug 17, 2005 3:02 pm
Posts: 7
In my bean class, I have 3 collections, a, b & c, that are set to non-lazy initialization. When I use
Code:
criteria.setFetchMode("a", FetchMode.EAGER)
for either a, b or c only, everything works fine. However, if I try to lazily initialize all 3, ie,
Code:
criteria.setFetchMode("a", FetchMode.EAGER).setFetchMode("b", FetchMode.EAGER).setFetchMode("c", FetchMode.EAGER)
, only 1 of the collections would be initialized and I would get a LazyInitializationException if I tried to access the other 2 collections. I speculate that the property that appears first in my mapping file is the one that gets successfully initialized. I am using version 2.1.8 of hibernate. My db is oracle 9i and i specified Oracle9Dialect as the dialect.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 4:04 pm 
Newbie

Joined: Wed Aug 17, 2005 3:02 pm
Posts: 7
never mind. found the answer. can't do eager fetching on more than 1 collection.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 4:09 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
It is possible in HB3.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.