How to choose the id generation strategy when using JPA and Hibernate
The API Doc are very clear on this. All generators implement the interface org.hibernate.id.IdentifierGenerator. This is a very simple interface. Some applications can choose to provide their own specialized implementations, however, Hibernate provides a range of built-in implementations. The shortcut names for the built-in generators are as follows: increment generates identifiers of type long, short … Read more