I use Doma.
then, I want to create sql like below.
select * from table where (col1, col2) in (('val1', 'val2'), ('val3', 'val4'));
can I do this? Do you know anything to solve it ? thanks.
Advertisement
Answer
Yes, you can do that with Doma Criteria API.
See my example:
The above example issues the following sql statement:
select t0_.id, t0_.name, t0_.age, t0_.version from Employee t0_ where (t0_.id, t0_.version) in ((1, 0), (2, 0))