We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当前使用版本 3.5.5、3.5.6 都试过
当前环境信息 例如: Java11 + Mysql5.7
描述bug现象 租户插件使用 exists 语句会失效
场景一:
@Select("select 1 from user userT where idNo = #{loginAccount} limit 1") Integer test1(String loginAccount);
==> Preparing: SELECT 1 FROM user userT WHERE idNo = ? AND userT.tenantId = 0 LIMIT 1 ==> Parameters: 445281199999995665(String) <== Total: 0
场景二: 使用exists不会添加tenantId字段的筛选: @Select("select exists(select 1 from user userT where idNo = #{loginAccount} limit 1)") Boolean test2(String loginAccount);
@Select("select exists(select 1 from user userT where idNo = #{loginAccount} limit 1)") Boolean test2(String loginAccount);
==> Preparing: SELECT EXISTS (SELECT 1 FROM user userT WHERE idNo = ? LIMIT 1) ==> Parameters: 445281199999995665(String) <== Columns: EXISTS (SELECT 1 FROM user userT WHERE idNo = '445281199999995665' LIMIT 1) <== Row: 1 <== Total: 1
提供问题复现步骤 租户插件,使用select exists语句查询,exists语句内的sql不会增加tenantId字段的筛选
The text was updated successfully, but these errors were encountered:
修复租户插件使用exists语句会失效
192d38b
#6139
用 3.5.7-SNAPSHOT 试试
Sorry, something went wrong.
No branches or pull requests
当前使用版本
3.5.5、3.5.6 都试过
当前环境信息
例如: Java11 + Mysql5.7
描述bug现象
租户插件使用 exists 语句会失效
场景一:
@Select("select 1 from user userT where idNo = #{loginAccount} limit 1") Integer test1(String loginAccount);
==> Preparing: SELECT 1 FROM user userT WHERE idNo = ? AND userT.tenantId = 0 LIMIT 1
==> Parameters: 445281199999995665(String)
<== Total: 0
场景二:
使用exists不会添加tenantId字段的筛选:
@Select("select exists(select 1 from user userT where idNo = #{loginAccount} limit 1)") Boolean test2(String loginAccount);
==> Preparing: SELECT EXISTS (SELECT 1 FROM user userT WHERE idNo = ? LIMIT 1)
==> Parameters: 445281199999995665(String)
<== Columns: EXISTS (SELECT 1 FROM user userT WHERE idNo = '445281199999995665' LIMIT 1)
<== Row: 1
<== Total: 1
提供问题复现步骤
租户插件,使用select exists语句查询,exists语句内的sql不会增加tenantId字段的筛选
The text was updated successfully, but these errors were encountered: