Hibernate中in查询条件
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;
}

浙公网安备 33010602011771号