String hql="from User u where u.id in (:userlist)"; Query query = getSession().createQuery(hql); List<Long> list =new ArrayList<Long>(); query.setParameterList("userlist",list);
本文出自 “猴子也疯狂” 博客,谢绝转载!
原文:http://1251769215.blog.51cto.com/11633863/1839283