You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[错误报告]: com.baomidou.mybatisplus.extension.service.IService.remove(Wrapper<T> queryWrapper), 传入MPJLambdaWrapper参数, 如果两个表中都有逻辑删除字段, 如mybatis-plus.global-config.db-config.logic-delete-field: deleted, 报错java.sql.SQLIntegrityConstraintViolationException: Column 'deleted' in field list is ambiguous
#227
Open
3 tasks done
geshichuangdi opened this issue
Nov 15, 2024
· 0 comments
com.baomidou.mybatisplus.extension.service.IService.remove(Wrapper queryWrapper), 传入MPJLambdaWrapper参数, 如果两个表中都有逻辑删除字段, 如mybatis-plus.global-config.db-config.logic-delete-field: deleted, 报错java.sql.SQLIntegrityConstraintViolationException: Column 'deleted' in field list is ambiguous,
UPDATE user_role t LEFT JOIN user t1 ON (t1.id = t.user_id AND t1.deleted=0) SET deleted=1 WHERE t.deleted=0
综上; 问题原因是两个表都有deleted逻辑删除字段, remove函数设置deleted=1, 组装sql语句时没有指定哪张表的deleted字段
详细堆栈日志
No response
The text was updated successfully, but these errors were encountered:
确认
当前程序版本
1.5.1
问题描述
com.baomidou.mybatisplus.extension.service.IService.remove(Wrapper queryWrapper), 传入MPJLambdaWrapper参数, 如果两个表中都有逻辑删除字段, 如mybatis-plus.global-config.db-config.logic-delete-field: deleted, 报错java.sql.SQLIntegrityConstraintViolationException: Column 'deleted' in field list is ambiguous,
UPDATE user_role t LEFT JOIN user t1 ON (t1.id = t.user_id AND t1.deleted=0) SET deleted=1 WHERE t.deleted=0
综上; 问题原因是两个表都有deleted逻辑删除字段, remove函数设置deleted=1, 组装sql语句时没有指定哪张表的deleted字段
详细堆栈日志
No response
The text was updated successfully, but these errors were encountered: