Answers for "hibernate mysql id generator"

SQL
0

jpa generationtype sequence mysql

In Dec 2020, you still can’t use this strategy (SEQUENCE) with a MySQL database. 
It requires a database sequence, and MySQL doesn’t support this feature.

If you’re working with a MySQL database, you should always use 
GenerationType.IDENTITY. It uses an autoincremented database column and 
is the most efficient approach available. You can do that by annotating 
your primary key attribute with 
@GeneratedValue(strategy = GenerationType.IDENTITY).
Posted by: Guest on December-10-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language