mybatis一对多关联查询+pagehelper->分页错误

mybatis一对多关联查询+pagehelper->分页错误。

现象:

网上其他人遇到的类似问题:https://segmentfault.com/q/1010000009692585

解决:

pagehelper不支持这种查询:

https://github.com/pagehelper/Mybatis-PageHelper/issues/186

暂时解决方案:

collection标签里使用select属性指定子查询(缺点:查询次数增多)

todo:

实现自己的分页插件

 

posted @ 2018-03-02 11:48  JillWen  阅读(9700)  评论(0编辑  收藏  举报