Error updating database. Cause: java.sql.SQLException: Field 'id' doesn't have a default value
这个问题主要是在实体类的id属性上加了@TableID(type=IdType.AUTO)
而数据库中的id字段主键没有设置为AUTO自增
给数据库id字段主键加上自增后就可以了
测试通过
Error updating database. Cause: java.sql.SQLException: Field 'id' doesn't have a default value
这个问题主要是在实体类的id属性上加了@TableID(type=IdType.AUTO)
而数据库中的id字段主键没有设置为AUTO自增
给数据库id字段主键加上自增后就可以了
测试通过