i know this question was asked before but a can't resolve the problem. I want to generate a table by @Entitiy class.
@Entity
public class Test implements Serializable{
@Id
@GeneratedValue long id;
.
.
.
}
in my app properties i got :
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect
spring.jpa.database=mysql
spring.jpa.hibernate.ddl-auto=create
spring.jpa.properties.hibernate.show_sql=true
I 'm running a mysql 5.7. The problem is that the table is created and id is marked as primary key. But Default is NULL and Extra ( where I expect autoincrement) is empty.
+----------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+-------+
| id | bigint(20) | NO | PRI | NULL | |
+----------+--------------+------+-----+---------+-------+
Is there something I am missing or that is mittsonfigured?