I have in my domain class a set of Integers like...
class MyDomain {
(...)
Set ids
(...)
}
And would like to have a criteria to find if my object has an specifid id in that set.
Which means something like...
MyDomain.withCriteria {
/* ids contains myId * /
}
'in' doesn't work - I want the reverse. myId must be within ids.
So - anyone can help me with that?
edit:
Let's suppose I have a MyDomain object with an ids set containing [2,3] and another having [3,4].
I want to have a criteria that returns all MyDomain objects that contains the id 2 in the ids set, so the result value of my criteria would be a list containing only the first MyDomain object mentioned.