Hi all,
I am using a named query to get a list of Tickets which works fine.
However, I'd like to extend the funcions and wonder how I could make a query like SELECT * FROM Ticket WHERE status IN ( one , two, three)
Obviously I don't know how many params I have in the IN clause. Previously (with only one status) I called my query like:
Code:
tickets = session.getNamedQuery("ticketList")
.setString(0, user.getName())
.setString(1, user.getCompany())
.setString(2, status)
.setInteger(3, product.getId())
.list();
Could anyone explain how to realise this IN clause ?
Thanks
Hibernate version: 3.2.2 GA