08 2009 檔案
beforeUpdate或者beforeUpdate不起作用
摘要: 例子 class Hotel{
static constraints = {
name()
crTime(nullable:true)
upTime(nullable:true)
}
String name
Date crTime
Date upTime
def beforeInsert = {
crTime = new Date()
}
def beforeUpdate = {
upTime = new Date()
}
}
crTime(nullable:true)
upTime(nullable:true)不設(shè) 保存或更新靜默失敗(beforeInsert或beforeUpdate 不起作用)
閱讀全文
posted @
2009-08-28 15:50 冰是沒有未來的,因為它的永恒|
編輯
is not domain class 錯誤
摘要: 測試了grails時候 在新創(chuàng)建domain class之后 測試 ,發(fā)現(xiàn)老是提示is not domain class 錯誤,
解決的辦法就是grails clean 在重啟app就可以了
閱讀全文
posted @
2009-08-26 16:00 冰是沒有未來的,因為它的永恒|
編輯