我在List
方法中使用Restrictions.in
对象,现在我必须在Restrictions.like
中使用这种情况但是Restrictions.like
不接收List
参数。我怎么解决这个问题?我的代码在底部:
public void setPhones(Set<String> phones) {
this.phones.addAll(phones);
if (!this.phones.isEmpty()) {
aliases.add(new QueryAlias("profile", "profile"));
criterions.add(Restrictions.like("profile.phone", this.phones));
}
}
我在Restrictions.in方法中使用List对象,现在我必须在Restrictions.like中使用这种情况,但是Restrictions.like无法接收List参数。我怎么解决这个问题?我的代码是底部:public ...
更正我以前的(现在已经编辑)的答案