如何使用List Restrictions.like]中的params>

问题描述 投票:1回答:1

我在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 ...

java spring hibernate criteria dropwizard
1个回答
0
投票

更正我以前的(现在已经编辑)的答案

© www.soinside.com 2019 - 2024. All rights reserved.