1. increment (incremental)
The unique identifier generated for long, short, or Int type. It can be used only when data is inserted in the same table of no other process network.
2. Identity
Supports the built-in Flag Fields of DB2, MySQL, MS sqlserver, Sybase, and returns the long, short, or Int type.
3. Native (local)
Select the current identity and Sequence Based on the capabilities of the formation Database
4. Assigned
ApplyProgramAssign an identifier to the object before saving ().
Differences between increment and identity
The increment method is incremental identifier implemented by hibernate. Each increment is 1.
The identity method relies on the auto-increment primary key generation mechanism of the underlying database. Each increment can be controlled in the database.
You can select native if you are not sure about identity, sequence, and increment.
Assigned mode. This mode can be used when the database uses a user-defined single primary key.