I'm using hibernate 3 on mysql 5 to model a many to one of Multimedia to Tag.
I started with a search for Multimedia with
any of the given tags - e.g.:
Code:
from Multimedia m where m.tags.tagValue in ('Tim', 'Sweden')
I would like to search for Multimedia with
all of the given tags - e.g.:
Code:
from Multimedia m where m.tags.tagValue = 'Sweden' and m.tags.tagValue = 'Tim'
Obviously this is not good hql as the number of search tags is unknown. Given that there is no interect, can someone please suggest cleaner hql for this? I know I'm missing something simple...
Many thanks