SequenceGenerator
annotation in package klyn.data.mapping

    public annotation SequenceGenerator(
    name as String = "",
    sequenceName as String = "",
    catalog as String = "",
    schema as String = "",
    initialValue as Long = 1L,
    allocationSize as Int = 50
    )

SequenceGenerator

Declares a named sequence-based identity generator.

Providers without sequence support reject this mapping instead of silently selecting another generation strategy.

Example

    @SequenceGenerator(
    name="orderSequence",
    sequenceName="SEQ_ORDERS",
    allocationSize=50
    )
    @Entity
    public class Order:
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="orderSequence")
    public property id as Long