版本
mybatis-plus 3.5.3
该问题是如何引起的?(确定最新版也有问题再提!!!)
- 创建Temp 对象,对象中包含一个基本类型字段
- 在Test 对象中添加Temp 类型字段,并且增加注解 @TableField(typeHandler = JacksonTypeHandler.class)
- 使用lambdaUpdate 进行set 设置值
- 程序提示错误,使用updateById 则没有错误 ,错误信息是 Use setObject() with an explicit Types value to specify the type to use.
重现步骤(如果有就写完整)
- 创建 对象
class Temp{
public String address;
}
@TableName(value = "test",autoResultMap = true)
class Test{
@TableId
Long id;
@TableField(typeHandler = JacksonTypeHandler.class)
public Temp temp
}
- 进行update测试
var update = Wrappers.<Test>lambdaUpdate();
update.set(Test::getTemp,new Temp()).eq(Test::getId,1);
报错信息
Comment From: miemieYaho
Comment From: wxiao1002
thx