Hi,
i need help for writing a hql-query, which compares two collections with the like '%tag%' operator.
Just imagine you have two collections with some tags (they arent fix):
CollectionA - football - volleyball CollectionB - football first class - first class football
Now for every tag in Collection A i want to find the hits in Collection B.
The query "select count(ca.tag) from CollectionA ca where ca.tag = any (select cb.tag from CollectionB)"
works fine for exactly same tags, but i need a query with like-operator ("%tag%) and the any function doesn't work with like.
Can you help me to create a correct hql-query for this job?
|