Table of Contents

TIdGenerator Enumeration

Specifies the built-in strategy used to generate primary key values for an entity.

Remarks

Pass one of these values to the AGenerator parameter of IdAttribute.Create. For a custom generator, use the overload that accepts a TGeneratorClass instead.

Syntax

Unit: Aurelius.Mapping.Metadata

Members

Name Value Description
None 0 No automatic generation; the application must assign the identifier value before saving the entity.
IdentityOrSequence 1 Uses a database identity column or sequence to generate the identifier. Requires a Sequence attribute when the database uses sequences rather than identity columns.
Guid 2 Generates a new GUID (globally unique identifier) as the identifier value.
Uuid38 3 Generates a UUID string in the 38-character format including braces and hyphens, for example {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.
Uuid36 4 Generates a UUID string in the 36-character format with hyphens, for example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
Uuid32 5 Generates a UUID string in the 32-character format without hyphens or braces, for example xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
SmartGuid 6 Generates a GUID with a sequential prefix derived from the current date and time, improving index locality on clustered primary key indexes.