Table of Contents

TColumn Class

Represents the mapping metadata for a single database column in an entity class.

Remarks

TColumn holds all information Aurelius needs to map a Delphi class member (field or property) to a physical database column: its name, data type, size constraints, behavioural flags (TColumnProps), and relationships to other columns (foreign-key references, discriminator, compound primary-key participation). Instances are created and owned by the mapping infrastructure; you do not normally instantiate TColumn directly.

Syntax

Unit: Aurelius.Mapping.Metadata

TColumn = class(TObject);

Constructors

Name Description
Create Creates a new, empty TColumn instance.

Destructors

Name Description
Destroy Destroys the column instance and releases its owned resources.

Methods

Name Description
Clone Creates a shallow copy of this TColumn with the same metadata but without cloning the referenced TColumn or TEntityProperty objects.
DefineReferencedCol Copies the data type, length, precision, and scale from a referenced column into this column, and sets ReferencedColumn to RefCol.

Properties

Name Description
Compound Indicates whether this column is one of multiple columns that together map to a single entity member (for example, a composite foreign key).
CompoundIndex Gets or sets the zero-based index of this column within the set of columns that map to the same entity member when Compound is True.
DeclaringClass Gets or sets the Delphi class that declares the entity member mapped to this column.
FieldType Gets or sets the TFieldType that describes the data type of the database column.
ForeignClass Gets or sets the entity class that owns the foreign key when this column is part of a foreign-key relationship.
IsDiscriminator Indicates whether this column is the discriminator column used for single-table inheritance mapping.
IsForeign Indicates whether this column is a foreign-key column that references another table.
IsId Indicates whether this column is (part of) the primary-key of the entity.
IsLazy Indicates whether the value of this column is loaded lazily from the database on first access rather than eagerly with the owning entity.
IsPrimaryJoin Indicates whether this column is part of the primary join between a child table and its parent table in a joined-tables inheritance hierarchy.
Length Gets or sets the maximum character or byte length of the column.
Name Gets or sets the physical name of the database column.
Precision Gets or sets the total number of significant digits for a numeric column.
Properties Gets or sets the behavioural flags that control how the column participates in INSERT, UPDATE, and schema-generation operations.
ReferencedClass Gets or sets the entity class that this column references when it acts as a foreign-key column pointing to another entity.
ReferencedColumn Gets or sets the TColumn that this column references, typically the primary-key column of the associated entity.
ReferencedColumnIsId Indicates whether the referenced column is the primary-key column of the associated entity.
ReferencedColumnName Gets or sets the name of the referenced column.
Scale Gets or sets the number of digits to the right of the decimal point for a numeric column.