I want to get the result of an SQL query like:
select * from myTable where property in (my list).
my problem is: how can i use the "in" condition with Hibernate.
can i do it whith hibernatetemplate ?
i try this codethis methode return my list, the list is not empty, so when i parse it, the objects are empty. all of property are null.Code:public class HibernateTransactionDao extends HibernateDaoSupport { public List findTransactionsToUpdate(String msisdns) throws DataAccessResourceFailureException, HibernateException, IllegalStateException { Session session= getSession(true); session.setFlushMode(FlushMode.AUTO); final List transactions=session.find("select tr from com.posanet.model.Transaction as tr where tr.msisdn in ('"+msisdns+"')"); if (transactions.size() == 0) { return null; } return transactions; } ... }
sorry, i have a low level in "english".
think's


Reply With Quote