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.