Home > Back-end >  Use mybatis and and or joint query
Use mybatis and and or joint query

Time:05-11

Use Example. The Criteria="XXX" and how to carry out the where XXX (xx1="xx1 or xx2"="xx2") joint query?
Online to find all the where (="XXX and XXX xx1=" xx1 ") or (="XXX and XXX xx2=" xx2 ")
This XXX="XXX" don't write again, and again, or only one, I can't write all again, so I want to ask to have no good method?

CodePudding user response:

Think of a way, I need the or another Criteria, these two conditions alone again and go in the
Example. The Criteria criteria2=Example. CreateCriteria () andEqualTo () orEqualTo ()
Example. And (criteria2);
  • Related