version
目的 Purpose
Used to disable optimistic locking or change the column that holds the version.使用例 Examples
class Book {
…
static mapping = {
version false
}
}詳細 Description
Usage:
使用方法: version(string/boolean)Usage:
version(string/boolean)By default GORM is configured with optimistic locking enabled. You can disable this by calling the version method with an argument of false:static mapping = { version false }
version method to change the name of the database column:static mapping = {
version 'revision_number'
}
