jpa generationtype sequence mysql

Solutions on MaxInterview for jpa generationtype sequence mysql by the best coders in the world

showing results for - "jpa generationtype sequence mysql"
Antonia
28 Feb 2016
1In Dec 2020, you still can’t use this strategy (SEQUENCE) with a MySQL database. 
2It requires a database sequence, and MySQL doesn’t support this feature.
3
4If you’re working with a MySQL database, you should always use 
5GenerationType.IDENTITY. It uses an autoincremented database column and 
6is the most efficient approach available. You can do that by annotating 
7your primary key attribute with 
8@GeneratedValue(strategy = GenerationType.IDENTITY).
Hamish
13 May 2017
1456678