spring-data-jpa
spring-data-jpa copied to clipboard
ID String bug ddl auto_increment [DATAJPA-1788]
trafficstars
lj19950508 opened DATAJPA-1788 and commented
application:
spring.jpa.hibernate.ddl-auto=update
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
Entity:
@Id
@Column(columnDefinition = " varchar(32) comment 'ID'")
@GeneratedValue(strategy = GenerationType.AUTO, generator = "custom-id")
@GenericGenerator(name = "custom-id", strategy = "pers.gon.infrastructure.common.idgenerator.SnowFlakeId")
private String id;
Error:
Error executing DDL "create table sys_dict_item (id varchar(32) default '' comment 'ID' not null auto_increment
SnowFlakeId extend IdentityGenerator
When I user UUIDGenerator , It's works.
I don't need auto_increment , but it generators from hibernate.ddl
Affects: 2.3.4 (Neumann SR4)