Table of Contents

DiscriminatorColumnAttribute Class

Specifies the column used as the class discriminator in a single-table inheritance strategy.

Remarks

Apply this attribute to the root entity class alongside Inheritance when using TInheritanceStrategy.SingleTable. Aurelius writes a discriminator value into this column when persisting an object, and reads it back to determine the correct class to instantiate. Each descendant class must declare a DiscriminatorValue attribute with the corresponding value. The default length for string discriminator columns is 30 characters.

Syntax

Unit: Aurelius.Mapping.Attributes

DiscriminatorColumnAttribute = class(TCustomAttribute);

Constructors

Properties

Name Description
DiscrType Gets or sets the data type used for discriminator values.
FieldType Gets the TFieldType that corresponds to the configured DiscrType.
Length Gets or sets the column length (applicable for string discriminator columns).
Name Gets or sets the discriminator column name.