-->
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: PersistentBag forces initialization upon access?
PostPosted: Wed Dec 02, 2009 11:25 am 
Newbie

Joined: Wed Dec 02, 2009 11:19 am
Posts: 1
I am working with a very large object graph and thus all of my relationships are lazily loaded. This works quite well, except when dealing with collections. It seems that while Hibernate maps lazily loaded collections with a PersistentBag (I'm using annotations and explicitly marking all relationships as FetchType.LAZY). This is what I expect. However, I'm getting errors when accessing the bag (specifically, too many joins when MySQL is my back-end DB) because accessing any method of the bag (size(), get(int x), etc...) forces a deep initialization (as seen by the stack trace) of the underlying collection. Is there no way to access one of the members of the bag (which I would assume to be a proxy anyway) without causing a deep initialization?


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.