hibernate方法中参数传入数组的查询方法

public List<T> getByIds(Long[] ids) {
return getSession().createQuery(//
"FROM User WHERE id IN (:ids)")//
.setParameterList("ids", ids)//
.list();
}

posted @ 2016-08-31 23:42  江山一族  阅读(4085)  评论(0编辑  收藏  举报