I have a column with deadlineDays (integer), i need a filter with column in a grails gorm :
def products = Product.withCriteria() {
createAlias("company", "comp")
eq("comp.autoProductApproval", true)
le("statusDate", new Date())
notExists(subQuery)
maxResults(100)
}
In le("statusDate"... i need subtract (new Date() - comp.deadlineDays())
How do this in grails gorm?