Hibernate primary key generation strategy and describe

Hibernate primary key generation strategy and describe
1) .Increment: first check maximum id, based on this plus 1; hibernate automatically processed frame
2) .Sequence (Orade): oracle database automatically process
3) .Assigned: artificial assigned (repeated insertion of data would violate the uniqueness of the data)
4) :( .native local database generation strategy for multiple databases) for mysql.oracle, sqlserver, if the database is orade use the default sequence called hibernate-sequence
5) .uuid: generating a 32-bit, not duplicate primary keys, can achieve true cross-database (usually, corresponding to string data type should be)
. 6) .foreign: one generally used when the primary key, based on primary key foreign key generation strategy

Guess you like

Origin blog.csdn.net/weixin_45031351/article/details/91038414