How can I get the same results in Play Framework's Model Queries?
SELECT * FROM MyModel WHERE status IN (1, 5, 8) ORDER BY createdAt;
How can I get the same results in Play Framework's Model Queries?
SELECT * FROM MyModel WHERE status IN (1, 5, 8) ORDER BY createdAt;
If
(1, 5, 8)
is a constant, it's pretty straightforward:If it should be a parameter:
An important point here is that you can use
in
clause with named parameters only, not with positional (?
) ones, due to limitation of Hibernate.Have you tried