Difference between Hibernate Automatic value generation strategies?
问题 What is the difference between these two Automatic value generation strategies? 1. @GeneratedValue 2. @GeneratedValue(strategy=IDENTITY) 回答1: This is like following: AUTO Indicates that the persistence provider should pick an appropriate strategy for the particular database. IDENTITY Indicates that the persistence provider must assign primary keys for the entity using database identity column. SEQUENCE Indicates that the persistence provider must assign primary keys for the entity using