有什么方法可以 select 一个 collection 包含任何另一个 collection 元素吗?
Is there any way to select a collection contains any of another collection elements?
我的 Profile
class 有一个 collection 属性。
class Profile {
private List<String> aliases;
}
我如何查询选择 Profile
的 aliases
包含任何给定的 collection?
例如,选择别名包含 [a
、b
、c
] 中的任何配置文件?
where 'a' member of p.aliases or 'b' member of p.aliases or 'c' member of p.aliases
或
join p.aliases a where a in ('a','b','c')
我的 Profile
class 有一个 collection 属性。
class Profile {
private List<String> aliases;
}
我如何查询选择 Profile
的 aliases
包含任何给定的 collection?
例如,选择别名包含 [a
、b
、c
] 中的任何配置文件?
where 'a' member of p.aliases or 'b' member of p.aliases or 'c' member of p.aliases
或
join p.aliases a where a in ('a','b','c')