• Archives
  • All Categories
  • All Tags

字段

1 article

404 adobe-xd app开发 bbs centos curl dart discourse ditto dns docker fastjson flame flutter flutter-web fork git github hexo homebrew idea jar java json just-for-fun kotlin linux macos map maven microsoft应用商店 minecraft mybatis mybatis-plus mysql nginx node npm null nvm object php pip pr python react spring springboot sql stack-overflow swagger ubuntu unicode vim vue win10 windows wordpress yum 上线准备 书籍资源 关联查询 出生日期 前端 博客排版 后端 国内加速 国际化 图像 字段 字符编码 字符转义 容器 常用操作 常用组件 常识 序列化 开源 快速开发 技术书籍 搜狗 支付宝 效率 教程 数据库 文件编辑 时区 极客用语 毛玻璃 游戏开发 环境部署 生日 空格 缓存 网络配置 访问加速 词库 踩坑 输入法 运维 闲鱼 阿里巴巴 项目信息
images/default2.jpg

Mybatis-Plus 更新字段数据为null

Monday, Jul 20, 2020

在使用Mybatis-Plus开发项目时, 需要将数据库某字段值设置为null. 但是仅将实体类的值赋值为null是不够的. 还需要为实体类的属性添加以下注解: `@TableField(fill = FieldFill.UPDATE)` 比如你需要设置某表的字段name为null, 则需要进入实体类, 在对应的属性上添加注解: `@TableField(fill = FieldFill.UPDATE) private String name;`
1 minute read

© 2025 阿航的技术小站

蜀ICP备2022014599号-1

© 2025 阿航的技术小站

蜀ICP备2022014599号-1