-->
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: Enabling lazy fetching in criteria api?
PostPosted: Thu Nov 07, 2013 6:03 pm 
Newbie

Joined: Fri Oct 28, 2005 10:54 pm
Posts: 12
Our product is using Hibernate 3.6.10 at the moment. Our clients are Java webstart/Swing clients and run in a separate JVM, using EJBs and RMI to pass the data between server and clients, so by default, all of our beans are defined at lazy=false in our mapping files. Annotations not currently used.

We have a case now of a bean that has a one-to-many collection/association but when we want to provide an api to get a list of the parent objects without populating all the child objects in each parent. I found the following posting on StackOverflow but was not able to make their solution (the second one in the posting - not the first!). http://stackoverflow.com/questions/2222840/hibernate-enabling-lazy-fetching-in-criteria-api

Lazy loading if truly the exception rather than the rule for us, but is there a way for us to get a list of the parent objects where the child objects are not loaded (like with Lazy loading)?


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.