0
我在集合上使用querydsl。 我想要获取包含在另一个列表中的所有元素。querydsl over集合在子句中
public class Parent {
private List<Child>;
}
public class Child {
private String key;
private String value;
}
由于子对象的具体名单(List<Child> lovedChilds
),对于每一个家长,我需要选择那些孩子的都包括在lovedChilds
。
List<Parent> parents = ...;
for (Parent parent in parents)
{
select
from (child, parent.childs)
where lovedChilds contains a lovedChild
where child.getKey.equals(lovedChild.getKey);
}