一些标准如何:关联+不+我喜欢并没有给出好的结果。我仍然会收到具有我不希望在结果中的状态的操作的案例。其他方法的任何线索或建议?
我在控制器中有这个:
def pgp = [:]
pgp.max = params.max?.toInteger() ?: 20;
pgp.offset = params.offset?.toInteger() ?: 0
pgp.max = 20;
def result = Case.createCriteria().list(pgp) {
actions {
not {
and {
ilike("status","%CLOSED")
ilike("status","%Installed in PRD")
}
}
}
}
这是相关的域截图:
class Case {
String caseCode
String caseName
String caseType
static hasMany = [ actions : Action ]
我在 Grails 2.4.4 上