Thanks for the reply. I tried that but still, it doesn't solve my issue. In my issue, I want to select the Owner object which has maching tags (String) for all of the Strings which I specify as parameters.
For example, If I specify A,B,C as parameters, it should give me the set of Owner objects which has
A, B and C in the tags collection (all of them).
Quote:
select distinct o from Owner o inner join o.tags t where t in ('A', 'B', C)
By modifying your query, I get the owner objects which has
either A, B or C, where as I expect owner objects with all A, B and C in tags.
Can you suggest me a change in the query which you have given which will allow me to get it done?
Thanks.
P.S : Also, the number of parameters to match will change in my problem. For example, it could be 2 one time and it could be 3 next time. So I think Criteria API would suite better, but I have no idea how to use it. Is there anyway I could use it here?