I want to create a JPA parameterised query for following SQL statement
select * from car where (colour, speed) in (('red', 50), ('blue', 70))
this query returns the expected result
entityManager.createQuery("from Car c where (c.colour, c.speed) in (('red', 50), ('blue', 70))", Car.class).getResultList();
How can the currently hardcoded values be passed as parameter?
I came up with below "working" solution. But I fear that there is no guarantee that all parameter pairs are passed in the expected order? I don't want to get "blue" cars with speed "50".
edit: removed as it doesn't work as expected, see also @Gas comment