Table of Contents

TInheritanceStrategy Enumeration

Specifies the database mapping strategy used to persist an entity class hierarchy.

Remarks

Pass one of these values to InheritanceAttribute.Create on the root class of the hierarchy. Each strategy has different trade-offs in terms of query performance, schema normalisation, and support for nullable columns.

Syntax

Unit: Aurelius.Mapping.Metadata

Members

Name Value Description
None 0 No inheritance mapping strategy is applied.
SingleTable 1 All classes in the hierarchy are stored in a single database table. A discriminator column identifies the concrete class of each row. Columns belonging to subclasses are nullable for rows of other classes.
JoinedTables 2 Each class in the hierarchy has its own table. A child table's primary key is also a foreign key referencing the parent table's primary key, joining the two rows together.