-->
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: The right way to load complex graph of objects
PostPosted: Fri Dec 10, 2010 6:29 am 
Newbie

Joined: Fri Dec 10, 2010 6:21 am
Posts: 1
Hi,

I have a complex object with many n-n relation like this :

Code:
class A {
  List<B> listB;
  List<C> listC;
}

class B {
  List<D> listD;
}
class C {
  E e;
}
// Classes D and E are POJO without any relation.


How can I retrieve from the database an object 'A' fully loaded (with all the relations (listB, listC) and subrelations (listD) ...) in order to work with him in detached state. What is it the best solution to minimize the number of query executed ?

Note: I can not use the fetch mode Eager.

Thanks,

Julien


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.