Hi all,
In the past (Hibernate 3.6.10) we used this tag to delegate the better strategy to Hibernate and worked (in MySQL used autoincrement, in Oracle sequence, etc):
@GeneratedValue(strategy = GenerationType.AUTO)
But Hibernate 5.3.10 always create a table called “hibernate_sequence” in databases like MySQL (it should use the AUTOINCREMENT). I’ve tried with IDENTITY and seems to work, even in Oracle but since 12c (previous Oracle versions does not support IDENTITY):
@GeneratedValue(strategy = GenerationType.IDENTITY)
How can I choose the best generated value strategy foreach database? Is there any option which decides the best strategy depending on the database dialect, like in Hibernate 3.6.10?