Writing request that fetches all document entities that match different criteria I have two requests that work and each of them return some results that are completely different: First:
def documents = Document.withCriteria {
pproperty{
user{
idEq uuser.id
}
};
}
Second:
def documents = Document.withCriteria {
loan{
bank{
user{
idEq uuser.id
}
}
}
}
I'm trying to get the result of two in one query:
def documents = Document.withCriteria {
or {
pproperty{
user{
idEq uuser.id
}
};
loan{
bank{
user{
idEq uuser.id
}
}
}
}
}
And I get an empty result set. What's wring with queries or it's a grails bug?