com.baomidou.mybatisplus.core.exceptions.MybatisPlusException:
com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, please exclude the tableName or statementId.
·
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笑死了, 这么简单的错,哈哈哈哈哈哈,完全就是粗心大意

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)