Hi,
I can't understand how(if it all) hibernate make sure the object that I want to update with the database are up to date.
For example:
I am using session per "unit-of-work", meaning when a request is coming create or reconnect the session, and when he leave I disconnect the session.
Now, there are 2 users that asked for the same order information and the first user was update the order and right after him the second user try to update the same order.
Do I have an option to know that the object was changed? or do I need to load or refresh the object each time before I update it?
I read something about the LockMode but I didn't understant it and when I tested it, it didn't work.
Avi
|