HibernateCrazyLoverr wrote:
We have also tried that by committing the transaction before updating the timestamp. But still it is giving the same problem where no exceptions
has been thrown.. where we are expecting a "StaleStateException".
Any suggestions regarding this are welcome..
I'm a little confused about the order of events. The only way that you'll get a StaleObjectStateStateException is if the following events occur.
1) Read Object in Hibernate code from database.
2) Update same row in database, including timestamp, externally and commit change to the database.
3) modify some data in the hibernate Object, but NOT the timestamp. Hibernate handles this for you.
4) commit change in hibernate - this should throw an exception.