Grails 1.1 事件类型 - beforeUpdate事件

当一个对象被更新之前触发[code]class Person {
Date dateCreated
Date lastUpdated
def beforeInsert = {
dateCreated = new Date()
}

def beforeUpdate = {
lastUpdated = new Date()
}

}[/code]