@Data
@Accessors(chain = true)
@TableName(value = "t_user", autoResultMap = true)
public class UserDO{
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Integer age;
@TableField(typeHandler = ListInteger2ListLongTypeHandler.class)
private List<Long> friendIds;
}
推荐使用第三种方式,如下
lambdaUpdate().set(UserDO::getAge, null).eq(UserDO::getId, id).update();