1.1 Identity
Description
1. The table must support the automatic growth mechanism
2. Database Generation PRIMARY Key
3, do not need to set the primary key in the program
1.2 Assigned
Description
The value must be given in the program's Way.
PID is assigned in the program, and is used in the development environment and test environment.
1.3 Increment
Description
1. If you choose how the primary key is generated, you must be a numeric type
2, first get the maximum value of the primary key, add 1 on the basis of the maximum value, form a new primary key
3, to achieve the increased operation:
4. Low efficiency
5, the generation of the primary key is implemented by hibernate internal
1.4 Native
Different build strategies are selected based on the tables of the different databases
1.5 Uuid
Description
1. The primary key must be a varchar type
2, the primary key is generated by hibernate internally
3. Must be a string type in the Persistence class
No settings are required in the program
Primary key Generator