The company received the message from Bea.
Project objectives document
Data Access Service (DAS)
Text block. It contains the following content:
Optimistic Concurrency Control-Ability to detect and report update collisions when applying a change summary.
So I took a look at the implementation of hibernate locks and summarized them as follows:
1) pessi lock for Oracle/MySQL/ms SQL these three dialect, In the lockmode set. in the case of upgrade, select... is automatically generated... fro update; databases that do not support pessi lock do not have for udpate. For Sybase, you need to add the "Lock" field in the database, and then manually implement pessilock. 2) When the Opti lock2.1: Version method is saved, version = 0 is automatically set; when loading, the version field of this record is loaded; when updating, set version = 1... is automatically added .... where version = 0 can prevent 2nd class update loss problem 2.2: The timestamp method requires that the database field be Timestamp and can only be accurate to seconds, so in the case of concurrent ms, there may still be a problem. The 2.3 configuration method hibernate also provides another method. If the database already exists and there is no opti lock field, you can configure optimistic-lock. However, the implementation method is to take all the fields/or updated fields as conditions during update, which will affect performance.