Reputation: 185
I am using hibernate3 in my java application. I have to find the list of value from oracle using hibernate. So my query is like
Ex:
List<TestClass> selectedpins =DAO.findAll(from register where pin in (list))
This list contains list of ids(around 3000 values). Due to performance issue i am not able to use iterator. So kindly let me know how to use this list of value in this query.
Is it possible in hibernate3?
Upvotes: 1
Views: 3231
Reputation: 1595
session
.createQuery("select pins from register where pin in (:list)")
.setParameterList("list", pinIds)
.getResultList();
Upvotes: 1