Gents, quick question: I have a fairly simple query withCriteria() but I keep getting empty results.
class Version {
LocatableIndex data // nullable
}
class LocatableIndex {
LocatableIndexVersioning versioning
}
class LocatableIndexVersioning {
Date validUntil
}
That's my model (simplified) then I do:
Version.withCriteria {
or {
isNull('data')
and {
isNotNull('data')
data {
versioning {
gt('validUntil', date_version_at_time)
}
}
}
}
}
Even if I have Version's with null data, I keep receiving null results while I expect those to be part of the result because of the OR isNull('data')