-->
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: Unsustainability of explicitly loading lazy collections
PostPosted: Fri May 22, 2009 12:16 pm 
Newbie

Joined: Sun Apr 12, 2009 4:43 am
Posts: 11
Hi
I have declared several of my collections and associations to be loaded lazily (for performance). However, this does seem to give rise to a load of code in my service layer where I have to explicitly load a collection (using Hibernate.initialize) and then loop over the returned collection, and explicitly load other collections/proxies etc etc.
The only other option would appear to be to use the Open Session In View layer and keep the transaction open across the HTTP request. Or maybe to use an HQL query but I think I would still be setting some kind of eager fetch criteria for various objects explicitly so I dont think this helps.
Is there any other solution? What are people's views?
thanks, Baljeet.


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.