当前使用版本(必填,否则不予处理)
3.4.1
该问题是如何引起的?(确定最新版也有问题再提!!!)
自动填充功能测试主键,类型选择INPUT
entity类 @TableId(type = IdType.INPUT) private Long id;
配置类
// ID
strictInsertFill(metaObject, ID, () -> id, Long.class);
重现步骤(如果有就写完整)
报错信息
SQLIntegrityConstraintViolationException: Column 'id' cannot be null
查看源码发现strictInsertFill方法没有填充id, @TableId(type = IdType.INPUT) @TableField(fill = FieldFill.INSERT) private Long id;
在id上添加自动填充注解,会报一个警告说,自动填充注解无效
Comment From: miemieYaho
本来就不能