-->
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: how to use Criteria to get whole tree (N level) of object
PostPosted: Wed Sep 15, 2004 5:22 am 
Newbie

Joined: Tue Apr 13, 2004 12:02 am
Posts: 12
Single format, parent, children, grandchildren relationship, of course, all are one to many association.

i try to use Criteria with setFetchMode(Ass_name,FetchMode.EAGER)to get whole object tree.

For parent, children level is fine. but for grandchild failed.

So try HQL with left join in fetch, failed too.

So any advise is welcomed!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2004 10:19 am 
Beginner
Beginner

Joined: Mon May 03, 2004 1:25 pm
Posts: 31
You need to include your mapping and config files, but you might not have set you hibernate.max_fetch_depth in your config appropriately. This is just a guess, it's hard to know without seeing your mapping and config files.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2004 10:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You can only eager fetch one many-association per query/criteria


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.