(Quick Reference)
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)
By default GORM is configured with
optimistic locking enabled. You can disable optimistic locking by calling the
version
method with an argument of
false
:
static mapping = {
version false
}
Alternatively if you simply want to change the column used to store the version you can pass the name of the column:
static mapping = {
version 'revision_number'
}