insert的时候报错,sql语句没有插入主键did
数据库字段为:
(did,name,phone)
但是报错时显示为insert(name,phone) valuu(?,?,?)
居然没有did???
原因是在entity中加入了
@TableId(value = “did”,type = IdType.AUTO)
private String did;
改成
@TableId(value = “did”,type = IdType.INPUT)
private String did;
就可以了
解决方法:https://blog.csdn.net/weixin_41036106/article/details/88546834