当前使用版本(必填,否则不予处理)
v3.4.3
该问题是如何引起的?(确定最新版也有问题再提!!!)
重现步骤(如果有就写完整)
@Data
@Accessors(chain = true)
@TableName(value = "account", autoResultMap = true)
public class Account {
@TableId(type = IdType.INPUT)
@TableField(typeHandler = UuidToBinHandler.class)
private String id;
private String name;
private String title;
private String description;
private String identityId;
private boolean isDelete;
private Date createTime;
private Date updateTime;
private Date deleteTime;
}
@TableId和@TableField注解不能同时生效
报错信息
2021-06-16 20:20:03.270 WARN 6756 --- [ Test worker] c.b.m.core.metadata.TableInfoHelper : This "id" is the table primary key by @TableId annotation in Class: "com.robot.gs.iam.repository.entity.Account",So @TableField annotation will not work!
Comment From: juchaosong
I found the codes.
https://github.com/baomidou/mybatis-plus/blob/0ba73dc7ead685cba759991d7824a53f4262521f/mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableInfoHelper.java#L390-L393
Comment From: miemieYaho
就这样的