current position:Home>One to many query of mybatis. The query conditions are in multiple parties. PageHelper paging is integrated. How can this XML be better implemented

One to many query of mybatis. The query conditions are in multiple parties. PageHelper paging is integrated. How can this XML be better implemented

2022-02-02 19:26:20 CSDN Q & A

mybatis One to many queries for , How to implement query conditions in multiple parties , This xml How to achieve better




Refer to the answer 1:
select   a.test1,  b.test2,  c.test3from aleft join b on b.id=a.idleft join c on c.id=a.idwhere b.type =1 and c.type=1 You'd better have an alias , Prevent repeated field errors 



Refer to the answer 2:



Refer to the answer 3:

For this normative thing , Go more github,gitee Find someone else's project , See what people do




Refer to the answer 4:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202021926182863.html

Random recommended