Table of Contents

UniqueKeyAttribute Class

Defines a unique (exclusive) database index on one or more columns of the entity's table.

Remarks

Use UniqueKey to enforce uniqueness across a combination of columns at the database level. You do not need this attribute for single columns already marked with TColumnProp.Unique in a Column attribute, nor for the identifier column, as those are handled automatically. For non-unique indexes use DBIndex instead.

Syntax

Unit: Aurelius.Mapping.Attributes

UniqueKeyAttribute = class(TCustomAttribute);

Constructors

Name Description
Create Creates a UniqueKeyAttribute for the specified columns.

Properties

Name Description
Columns Gets or sets the list of column names that compose the unique key.