hql可以的。String ids[]=new String[]{"1","2","3"};String hql= " from com,you.YourPOJO where id in (?)"; Query query = session.createQuery(hql);
query .setParameters(ids);相关方法: Query setParameters(Object[] objectArray, Type[] typeArray) throws HibernateException;
Query setParameterList(String string, Collection collection, Type type) throws HibernateException;
Query setParameterList(String string, Collection collection) throws HibernateException;
Query setParameterList(String string, Object[] objectArray, Type type) throws HibernateException;
Query setParameterList(String string, Object[] objectArray) throws HibernateException;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货