1、Hibernate中in查询条件
public List<User> listByNames(List<String> names) { String hql = "from User where name in (:names)"; Query query = this.sessionFactory.getCurrentSession().createQuery(hql); query.setParameterList("names", names); return query.list; }
标签:Hibernate,List,查询,hql,names,条件,query From: https://www.cnblogs.com/wwssgg/p/17191115.html