How to map MySQL auto increment field

MySQL does not have the concept of sequence but uses AUTO_INCREMENT fields to emulate sequence behaviour. Supposing that you have just created this table:

mysql> create table customer (id integer auto_increment, name varchar(25));
Query OK, 0 rows affected (0.03 sec)

Then you can map the id field using a Generation type IDENTITY:

public class Customer  {

    private Long id;

    private String name;