list. Add (criteriaBuilder. Or (
CriteriaBuilder. And (criteriaBuilder. Equal (root) get (" a "), 1), criteriaBuilder. Equal (root) get (" b "), 1)),
CriteriaBuilder. And (criteriaBuilder. Equal (root) get (" a "), 0), criteriaBuilder. Equal (root) get (" b "), 0))
));
Execute the following JPA after generating SQL
=1 a and b=1 or 2 and a=b=2
I want to be like this SQL what to write? Can query and enclosed
((a=1 and b=1) or (a=2 and b=2))
CodePudding user response:
To solve, the original poster