Skip to content

annotation Athena::ORM::Annotations::SequenceGenerator #

Configures the database sequence the :sequence strategy of AORMA::GeneratedValue takes identifiers from.

@[AORMA::Column]
@[AORMA::ID]
@[AORMA::GeneratedValue(strategy: :sequence)]
@[AORMA::SequenceGenerator(name: "message_seq", allocation_size: 100)]
property! id : Int64

Todo

Not supported yet; the annotation is ignored, and the :sequence strategy raises when the entity's metadata is built.

Configuration#

Required Arguments#

name#

Type: String

The name of the sequence.

Optional Arguments#

allocation_size#

Type: Int64 Default: 1

How much the sequence is incremented by each time its next value is fetched. Values larger than 1 allow generating identifiers for that many entities with a single query.