com.baomidou.mybatisplus.core.exceptions.MybatisPlusException:

文章讲述了在使用MyBatisPlus时遇到FailedtoProcess异常的解决方法,问题在于SQL语句中缺少了and操作符。作者提醒在编写SQL时注意语法细节,如正确处理表名和标识符。
摘要由CSDN通过智能技术生成
Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, please exclude the tableName or statementId.
 Error SQL: select c.id from code_scanning_attribution c left join user_relation u on c.user_info_id = u.user_info_id
                    where c.parent = ? c.deleted = 0 and c.enabled = 1 and u.author_user_id is null

解决办法:

在 MyBatis Plus 中,如果你遇到类似 MybatisPlusException: Failed to process, please exclude the tableName or statementId 的错误,通常是因为 SQL 语句中的表名或语句标识未被正确解析。根据你提供的 SQL 语句看起来缺少了一个逻辑操作符 and,可能导致解析失败。

你可以尝试修改你的 SQL 语句,确保语法正确,例如在 where 条件中添加缺失的 and 操作符:

select c.id 
from code_scanning_attribution c 
left join user_relation u on c.user_info_id = u.user_info_id 
where c.parent = ? AND c.deleted = 0 and c.enabled = 1 and u.author_user_id is null

MD笑死了, 这么简单的错,哈哈哈哈哈哈,完全就是粗心大意

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值