Nov 9, 2017

Database sequences are the best identifier generator choice when using JPA and Hibernate.

This is because, unlike IDENTITY generator, you can take advantage of JDBC batch updates. Therefore, you should always use a database sequence if the underlying database supports this feature.