-->
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.  [ 2 posts ] 
Author Message
 Post subject: level limit for cascading
PostPosted: Mon May 22, 2006 7:44 am 
Regular
Regular

Joined: Tue Dec 14, 2004 5:21 am
Posts: 104
Location: india
Hibernate version: 3.1

Name and version of the database you are using:PostgreSQL 7.4

my senario is

classA <1----*> classB<1----*>classC ..... till classX (all have 1--* relation)

if i go for a code like this for persisting the entire association
like
Code:
ClassA classA = new ClassA();
....
....
classA.setClassB(classB);
classB.setClassC(classC);
....
...
(classX-1).setClassX(classX);

session.save(classA);


assuming i've give cascade="save-update" in all association mapping .
1) upto which level i can make use of cascading . here i am saving only classA object , which results in cascaded save of the associations
2) same question i have , in loading of classA and traversing the chain .
say, i load classA first.

i need to call classA.getClassB().getClassC().......
is there a limit to this level

i dont know if such situations occur in real time . but confused about the matter




[/code]

_________________
sHeRiN
thanks for your ratings ...... :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 22, 2006 10:19 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
No, there are no limits in either case. There are limits to eager loading (hibernate.max_fetch_depth), but not to lazy loading.

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.