(Quick Reference)

autoTimestamp

目的
Purpose

Disables auto timestamping when set to false

使用例
Examples

class Book {
    …
    static mapping = {
        autoTimestamp false
    }
}

詳細
Description

Usage: autoTimestamp(boolean) 使用方法:

Usage:
autoTimestamp(boolean)

By default when you have properties called dateCreated and/or lastUpdated in a domain class, Grails automatically maintains their state in the database. You can disable this by setting autoTimestamp to false:

static mapping = {
    autoTimestamp false
}