登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
代码拉取完成,页面将自动刷新
开源项目
>
数据库相关
>
数据库开发包
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
81
Star
435
Fork
138
tanghc
/
fastmybatis
代码
Issues
8
Pull Requests
0
Wiki
统计
流水线
服务
JavaDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
能否将逻辑删除列的赋值策略指定为自动取主键值,而非固定值
已完成
#I6LI68
有贝无患
创建于
2023-03-09 17:57
# 使用环境 > ↓↓ 请填写您的使用环境 ↓↓ - fastmybatis版本:2.5.0 - Java版本:1.8 - 数据库版本:MySQL-5.7 # 描述 背景:有个名称要校验唯一性,但逻辑删除的允许重复。比如:表有3列,id,name,deleted;当deleted为0时不允许name重复,现在在name和deleted上建立了唯一索引。deleted为0时表示未删除,非0时表示删除。逻辑删除时将主键id值赋给deleted就行。 需求:需要 让 deleteValue 自动取主键的值 现状:deleteValue只能写死 建议:@Column注解扩展一个属性deleteValueStrategy,当deleteValueStrategy 有值时候deleteValue失效,逻辑删除默认用deleteValueStrategy指定逻辑取值来填充逻辑删除列。
# 使用环境 > ↓↓ 请填写您的使用环境 ↓↓ - fastmybatis版本:2.5.0 - Java版本:1.8 - 数据库版本:MySQL-5.7 # 描述 背景:有个名称要校验唯一性,但逻辑删除的允许重复。比如:表有3列,id,name,deleted;当deleted为0时不允许name重复,现在在name和deleted上建立了唯一索引。deleted为0时表示未删除,非0时表示删除。逻辑删除时将主键id值赋给deleted就行。 需求:需要 让 deleteValue 自动取主键的值 现状:deleteValue只能写死 建议:@Column注解扩展一个属性deleteValueStrategy,当deleteValueStrategy 有值时候deleteValue失效,逻辑删除默认用deleteValueStrategy指定逻辑取值来填充逻辑删除列。
评论 (
3
)
登录
后才可以发表评论
状态
已完成
待办的
进行中
已完成
已关闭
负责人
未设置
标签
未设置
标签管理
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (15)
标签 (107)
master
dev
multi-ds
3.0.1
3.0
2.9.3-beta
2.6.2
feat/disable-join-sql-in-query
feat/builder-fix
1.x
association
plugin
startup-optimization
feature/dev
feature/pr2
3.0.10
3.0.8
v3.0.7
v3.0.6
v3.0.5
2.9.7
fastmybatis-spring-boot-starter-1.9.1
fastmybatis-core-1.9.1
fastmybatis-spring-boot-starter-1.9.0
fastmybatis-core-1.9.0
fastmybatis-spring-boot-starter-1.8.6.1
fastmybatis-spring-boot-starter-1.8.7.1
fastmybatis-spring-boot-starter-1.8.6
fastmybatis-core-1.8.6
fastmybatis-spring-boot-starter-1.8.5
fastmybatis-core-1.8.5
fastmybatis-spring-boot-starter-1.8.4
fastmybatis-core-1.8.4
fastmybatis-spring-boot-starter-1.8.3
fastmybatis-core-1.8.3
fastmybatis-spring-boot-starter-1.8.2
fastmybatis-core-1.8.2
fastmybatis-spring-boot-starter-1.8.1
fastmybatis-core-1.8.1
fastmybatis-spring-boot-starter-1.8.0
fastmybatis-core-1.8.0
fastmybatis-core-1.7.4
fastmybatis-spring-boot-starter-1.7.3
fastmybatis-core-1.7.3
fastmybatis-spring-boot-starter-1.7.2
fastmybatis-core-1.7.2
fastmybatis-spring-boot-starter-1.7.1
fastmybatis-core-1.7.1
fastmybatis-spring-boot-starter-1.7.0
fastmybatis-core-1.7.0
fastmybatis-spring-boot-starter-1.6.0
fastmybatis-core-1.6.0
fastmybatis-spring-boot-starter-1.5.1
fastmybatis-core-1.5.1
fastmybatis-spring-boot-starter-1.5.0
fastmybatis-core-1.5.0
fastmybatis-spring-boot-starter-1.4.2
fastmybatis-core-1.4.2
fastmybatis-spring-boot-starter-1.4.1
fastmybatis-core-1.4.1
fastmybatis-spring-boot-starter-1.4.0
fastmybatis-core-1.4.0
fastmybatis-spring-boot-starter-1.3.0
fastmybatis-core-1.3.0
fastmybatis-spring-boot-starter-1.2.0
fastmybatis-core-1.2.0
fastmybatis-spring-boot-starter-1.1.1
fastmybatis-core-1.1.1
fastmybatis-spring-boot-starter-1.1.0
fastmybatis-core-1.1.0
fastmybatis-spring-boot-starter-1.0.17
fastmybatis-core-1.0.17
fastmybatis-spring-boot-starter-1.0.16
fastmybatis-core-1.0.16
fastmybatis-spring-boot-starter-1.0.15
fastmybatis-core-1.0.15
fastmybatis-spring-boot-starter-1.0.14
fastmybatis-core-1.0.14
fastmybatis-spring-boot-starter-1.0.13
fastmybatis-core-1.0.13
fastmybatis-spring-boot-starter-1.0.12
fastmybatis-spring-boot-autoconfigure-1.0.12
fastmybatis-core-1.0.12
fastmybatis-spring-boot-starter-1.0.11
fastmybatis-spring-boot-autoconfigure-1.0.11
fastmybatis-core-1.0.11
fastmybatis-spring-boot-starter-1.0.10
fastmybatis-spring-boot-autoconfigure-1.0.10
fastmybatis-core-1.0.10
fastmybatis-spring-boot-starter-1.0.9
fastmybatis-spring-boot-autoconfigure-1.0.9
fastmybatis-core-1.0.9
fastmybatis-spring-boot-starter-1.0.8
fastmybatis-spring-boot-autoconfigure-1.0.8
fastmybatis-core-1.0.8
fastmybatis-spring-boot-starter-1.0.7
fastmybatis-spring-boot-autoconfigure-1.0.7
fastmybatis-core-1.0.7
fastmybatis-spring-boot-starter-1.0.6
fastmybatis-spring-boot-autoconfigure-1.0.6
fastmybatis-core-1.0.6
fastmybatis-spring-boot-starter-1.0.5
fastmybatis-spring-boot-autoconfigure-1.0.5
fastmybatis-core-1.0.5
fastmybatis-spring-boot-starter-1.0.4
fastmybatis-spring-boot-autoconfigure-1.0.4
fastmybatis-core-1.0.4
fastmybatis-spring-boot-starter-1.0.3
fastmybatis-spring-boot-autoconfigure-1.0.3
fastmybatis-core-1.0.3
fastmybatis-spring-boot-starter-1.0.2
fastmybatis-spring-boot-autoconfigure-1.0.2
fastmybatis-core-1.0.2
fastmybatis-spring-boot-starter-1.0.1
fastmybatis-spring-boot-autoconfigure-1.0.1
fastmybatis-core-1.0.1
fastmybatis-spring-boot-starter-1.0.0
fastmybatis-spring-boot-autoconfigure-1.0.0
fastmybatis-core-1.0.0
fastmybatis-spring-boot-starter-0.1.0
fastmybatis-spring-boot-autoconfigure-0.1.0
fastmybatis-core-0.1.0
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
参与者(1)
Java
1
https://gitee.com/durcframework/fastmybatis.git
git@gitee.com:durcframework/fastmybatis.git
durcframework
fastmybatis
fastmybatis
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册