-->
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: update query and parent - child objects
PostPosted: Tue May 11, 2004 6:19 pm 
Beginner
Beginner

Joined: Thu Apr 15, 2004 2:01 pm
Posts: 25
hi

When a update is called on a parent, does that mean that always childe will also be updated even if it's values are not modified?

Thanks
gita


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 12, 2004 11:05 am 
Regular
Regular

Joined: Wed May 12, 2004 3:03 am
Posts: 51
Location: France
Hi,

I think that if values of the child didn't change, so when you call update(myObj) nothing will happen. It is one of Hibernate job...

Charles


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 12, 2004 11:07 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
There is actually no need to do a session.update() if you modify an object inside of session scope (dirty checking will do that). You have to use update() if you modified a detatched object, in which case you will get an update for every object associated with cascading update (Hibernate can't know if your detatched objects changed or not)


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.