-->
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: Unnecesary updates to parent table on updating child record
PostPosted: Sat May 19, 2007 12:26 am 
Newbie

Joined: Fri Jan 26, 2007 10:13 pm
Posts: 9
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.2.2ga

Full stack trace of any exception that occurs:
StaleObjectException

Name and version of the database you are using:
Db2 7.2

I am having a peculiar problem of unnecessary updates to parent entity.
I have parent child relationship from A to B to C, A is B's parent and B is C's parent. All one-to-many from A to B to C. Every where cascade='all' is specified, i.e. both on one-to-many and many-to-one. Optimistic-lock is enabled through the <version> tag.

The problem is, for one set of data, updating fields of C does not trigger an update on A to increment the version number of A.
Yet for another data set an update happens on A when I update a field in C. This is indeed strange behavior given that I am only updating one single attribute in C which is date field.

Please advise.


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.