The following doesn't work for searching for multiple tags:
def tags = "1,2,3".split(",")
def results = Item.createCriteria().list() {
itemTags {
and {
tags.each { tag ->
like("name", tag)
}
}
}
}
But it does seem to work if I change the and to an or.
EDIT: In my debugging I found the criteria to be:
(itemTags_alias1.name=1 and itemTags_alias1.name=2 and itemTags_alias1.name=3)
Which is not what I'm aiming to accomplish. I want to check to see if an Item has all three tags.