0
該錯誤只有當我在的DetachedCriteria使用 '' 之間的關聯的內部發生準則:錯誤的DetachedCriteria使用 '之間'
new DetachedCriteria(Service).build {
execution {
between('date', new Date() -1, new Date())
}
}.list()
域類:
class Service{
static hasOne = [execution: ExecutionService]
static constraints = {
execution nullable: true
}
}
class ExecutionService {
Date date
static belongsTo = [servico: Servico]
static constraints = {
date nullable: true
servico nullable: true
}
}
OBS:Grails的版本:3.1.8