Reputation: 22007
My Profile
class has a collection attribute.
class Profile {
private List<String> aliases;
}
How can I query for selecting Profile
s whose aliases
contains any of given collection?
Say, selecting profiles whose aliases contains any of [a
, b
, c
]?
Upvotes: 2
Views: 2799
Reputation: 2933
where 'a' member of p.aliases or 'b' member of p.aliases or 'c' member of p.aliases
or
join p.aliases a where a in ('a','b','c')
Upvotes: 6