Generated with Auto Strategy

The AUTO strategy will select a generator depending on your database. This is a good choice, if you need to support multiple databases.

If your database supports sequences, they will be used. By default Hibernate uses a sequence named hibernate_id_seq. Make sure that it exists if you create your database manually.

You must add the @GeneratedValue annotation to your primary key.

public class Cheetah implements Serializable {
    private Integer id;

Same as XML mapping:

  <class name="Cheetah" table="cheetah">
    <id name="id" type="integer">
      <column name="id" />
      <generator class="native">
..... snip .....