yulichang / mybatis-plus-join

支持连表查询的mybatis-plus,mybatis-plus风格的连表操作提供wrapper.leftJoin(),wrapper.rightJoin()等操作
https://yulichang.github.io/mybatis-plus-join-doc/
Apache License 2.0
1.01k stars 115 forks source link

使用PageHelper分页插件left join查询返回空 #59

Closed Jackpot-lib closed 11 months ago

Jackpot-lib commented 1 year ago

使用com.github.pagehelper分页插件,普通单表查询没问题。但left join查询就会返回空了

gimlyu commented 11 months ago

遇到了类似情况,与分页关系不大。主要是在逻辑删除场景下:left join 在外层自动加了 t1.deleted = 0 的条件,left join 本身不要求右侧数据必须有,自动加上的限制条件导致结果集为空,这应该是个逻辑 BUG,Left Join 兼容的不好,没法用