Select all items from a list in hibernate

Viewed 21369

I have a list of product ids and I want to get all the products from my db with a hibernate query. How can I do this?

List<Integer> list = custumor.getCart();
Query query = query("select product from Product product where product.id =: list");

I know this isn't the best way to solve this, but I just want to know how I can test for all the values in a list.

2 Answers
Related