Table of Contents

TAbstractGenerator Class

Abstract base class for all Aurelius identifier generators.

Remarks

Subclass TAbstractGenerator to implement a custom primary key generation strategy and pass the subclass to IdAttribute.Create via the TGeneratorClass overload. Concrete generators must override GenerateId. Optionally override RetrieveIdAfterInsert when the identifier is assigned by the database after the INSERT statement executes (e.g., identity columns).

Syntax

Unit: Aurelius.Id.AbstractGenerator

TAbstractGenerator = class(TObject);

Methods

Name Description
GenerateId Generates a new identifier value for the given entity before it is inserted into the database.
RetrieveIdAfter​Insert Retrieves the identifier assigned by the database after the entity was inserted.