Is it possible to achieve something like the below mySQL in jpql?
select * from PERSON p where (p.name, p.country)
IN (('Bryan', 'Netherlands'), ('Candice', 'New Zealand'), ...);
where "..." is a continuation of the list. I thought of creating a list of new entities just as a placeholder for the values, but I'm not sure how to make it work. I'm thinking of something along the lines of:
@Query(
value = "select p from Person p where (p.name, p.country) in :personList")
List<Person> findPersonsIn(@Param("personList") List<Person> personList);
I know this is wildly incorrect, but I hope someone can shed light on how do I achieve the above MySQL statement in JPA or JDBC.