How to map a composite identifier using an automatically @GeneratedValue with JPA and Hibernate

Actually, only MySQL does not support sequences. Oracle, SQL Server, PostgreSQL and MariaDB support sequences, and they are preferred to IDENTITY because they allow automatic JDBC batch inserts.