TableGenerator
annotation in package klyn.data.mapping

    public annotation TableGenerator(
    name as String = "",
    table as String = "",
    catalog as String = "",
    schema as String = "",
    pkColumnName as String = "",
    valueColumnName as String = "",
    pkColumnValue as String = "",
    initialValue as Long = 0L,
    allocationSize as Int = 50
    )

TableGenerator

Declares a named table-backed identity generator.

A provider that cannot provide atomic table allocation rejects the mapping.

Example

    @TableGenerator(
    name="invoiceIds",
    table="KlynGenerators",
    pkColumnName="generatorName",
    valueColumnName="generatorValue",
    pkColumnValue="invoice",
    allocationSize=20
    )
    @Entity
    public class Invoice:
    @Id
    @GeneratedValue(strategy=GenerationType.TABLE, generator="invoiceIds")
    public property id as Long