I have a class "Content" where each instance contains a collection of Keywords. I'd like to create a query where I pass a set of Keywords and find all Content instances where any one of Keywords is referenced.
The following query seems to work for a single Keyword:
query="from Content as content where :keyword in elements(content.keywords)"),
However I can't seem to figure out how to apply a list of Keywords to it. This is how I would expect to do it via SQL:
# find content records that contain keywords 151 or 157 select distinct a.id from content a, content_keyword b, keyword c where a.id = b.content_id and b.keyword_id = c.id and c.id in (151,157);
Can anyone please help me here?
--john [ November 09, 2008: Message edited by: J. Cartwright ]