id

Purpose

Examples

Description

Usage: id(map)

Arguments:

generator (optional) - The name of the generator to use. Can be increment, identity, sequence, hilo, seqhilo, uuid, guid, native, assigned, select, foreign or sequence-identity. See Hibernate reference documentation for more information.

composite (optional) - Takes a list of property names to use that form the composite identifier

name (optional) - The property name to use as the identifier

params (optional) - Any parameters to pass to the defined identity generator

column (optional) - The column name to map the identifier to. The remaining column definition properties are also available.

By default GORM uses the native strategy to generate a database identifier for each entity (typically an auto-incrementing column or a sequence). You can alter this with the id methods generator argument:

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.