-->
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: max_fetch_depth
PostPosted: Wed Apr 11, 2007 7:41 am 
Senior
Senior

Joined: Mon Jul 24, 2006 8:43 am
Posts: 160
Hi,
If the configuration parameter max_fetch_depth is not set and there is no default how does hibernate know when to stop adding JOINs to its' SQL statement?
For example, suppose in my model I have 10 entities, A, B, C, D, E, F, G, H, I and J.
A has a 1:1 association with B, B has a 1:1 association with C, C has 1:1 to D and this pattern continues right down to J.
Hibernate always fetches both sides of 1:1 relationship when either side of the relationship is being read, there is no way to stop hibernate doing this.
Does this mean if I issue an em.refresh() or issue a em.find() on a A instance that I will end up generating a SQL statement that will read from A,B,C,D,E......... J?

Kind regards


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.