You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/05/16 01:44:07 UTC

[GitHub] [incubator-shardingsphere] haj8888888 opened a new issue #2391: After using the sharding-proxy sub-table to sub-table, use the PageHelper plug-in to query one-to-many data, and the number of returned records is incorrect.

haj8888888 opened a new issue #2391: After using the sharding-proxy sub-table to sub-table, use the PageHelper plug-in to query one-to-many data, and the number of returned records is incorrect.
URL: https://github.com/apache/incubator-shardingsphere/issues/2391
 
 
   Code screenshot:
   ![image](https://user-images.githubusercontent.com/15724396/57820305-d0146580-77be-11e9-80bb-aacfa31968d9.png)
   ![image](https://user-images.githubusercontent.com/15724396/57820309-d73b7380-77be-11e9-9803-aa502196f858.png)
   ![image](https://user-images.githubusercontent.com/15724396/57820323-de628180-77be-11e9-9c13-d824dc702483.png)
   ![image](https://user-images.githubusercontent.com/15724396/57820333-e4586280-77be-11e9-9f3d-b811cf818c06.png)
   Return result:
   [DEBUG] 2019-05-15 18:27:44,559 --main-- [com.mec.dao.OrderDao.selectByJoin_COUNT] ==>  Preparing: SELECT count(*) FROM t_order t JOIN t_order_item ti ON t.order_id = ti.order_id  
   [DEBUG] 2019-05-15 18:27:44,617 --main-- [com.mec.dao.OrderDao.selectByJoin_COUNT] ==> Parameters:  
   [DEBUG] 2019-05-15 18:27:44,634 --main-- [com.mec.dao.OrderDao.selectByJoin_COUNT] <==      Total: 1 
   [DEBUG] 2019-05-15 18:27:44,636 --main-- [com.mec.dao.OrderDao.selectByJoin] ==>  Preparing: SELECT t.*, ti.order_item_id as a_order_item_id, ti.order_id as a_order_id, ti.user_id as a_user_id, ti.`status` as a_status FROM t_order t JOIN t_order_item ti ON t.order_id = ti.order_id limit ?,?  
   [DEBUG] 2019-05-15 18:27:44,642 --main-- [com.mec.dao.OrderDao.selectByJoin] ==> Parameters: 0(Integer), 2(Integer) 
   [DEBUG] 2019-05-15 18:27:44,649 --main-- [com.mec.dao.OrderDao.selectByJoin] <==      Total: 2 
   [INFO ] 2019-05-15 18:27:44,651 --main-- [com.mec.order.test.ShardingProxyMybatisTest] Order{orderId=1557913094808, userId=688, status='ON', orderItemList=[OrderItem{orderItemId=1557913094807, orderId=1557913094808, userId=688, status='OFF'}, OrderItem{orderItemId=1557913094808, orderId=1557913094808, userId=688, status='ON'}]} 
   Problem Description:After using the sharding-proxy sub-table to sub-table, use the PageHelper plug-in to query one-to-many data, and the number of returned records is incorrect.Actually should return 2 records
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services