hql select where in

public List<User> getUserByIds(List<Long> ids) {

        Query query = getSession().getNamedQuery("getUserByIds");
        query.setParameterList("ids", ids);
        return (List<User>) query.list();

 

}

 

 

 

from User where id in (:ids)

你可能感兴趣的:(select)