Hibernate has an identifier generation strategy called native
that selects identity
, sequence
or hilo
depending upon the capabilities of the underlying database. I used MySQL with hibernate.hbm2ddl.auto=update
which generated id BIGINT(20) NOT NULL AUTO_INCREMENT
for id
property of Long
Java data type.
I am trying to understand how did Hibernate choose AUTO_INCREMENT
when it used SchemaExport
tool. Is AUTO_INCREMENT
the default primary key generation strategy for MySQL?
Could somebody help me understand it?