Table of Contents

Enum RelationshipKind

Namespace
NextORM.Core
Assembly
nextorm.core.dll

The cardinality of a declared navigation relationship.

public enum RelationshipKind
Extension Methods

Fields

ManyToMany = 3

Two collection navigations joined through a junction. Represented by the model but not creatable through the slice-A fluent API; loading it is rejected in a later slice.

ManyToOne = 1

A reference navigation on the dependent side, for example Child.Parent. The foreign key lives on the declaring (dependent) type.

OneToMany = 0

A collection navigation on the principal side, for example Parent.Children. The foreign key lives on the related (dependent) type.

OneToOne = 2

A reference navigation whose foreign key is unique. The uniqueness is a declaration-time trust: the core neither inspects the schema or the data nor imposes a uniqueness constraint, and a non-unique foreign key is accepted when the metadata is built. The only guard is per parent at load time: two distinct non-null child identities for one parent throw InvalidOperationException at materialization, while repeated identical rows and keyless/null-identity repeats are tolerated (the first child wins). Declarable through the fluent HasOneToOne or the model.

Remarks

A relationship is declared explicitly on both sides (fluent HasMany/HasOne or RelationshipAttribute); the kind is derived from the navigation shape (collection or reference) and is not inferred from conventions.