I have problem with criteria in grails
I have a domain User and another domain Conversation Conversation has Many Participants(domain)
When I do like this:
def c = Conversation.createCriteria();
c.get{
createAlias('participants', 'p')
eq 'p.user', user
eq 'p.folder', folder
eq 'p.unread', true
projections{
count('id')
}
}
It gives wrong output by showing the following criteria failure :
abc.Conversation : 1
eq('[XYZ]', 'XYZ') == false
sorry
conv == []
Can anybody help?
the standard way to look through
hasMany
incriteria
is this: