Table of Contents

Class RelationshipJunctionMetadata

Namespace
NextORM.Core
Assembly
nextorm.core.dll

Immutable metadata for the junction (link) entity of a many-to-many relationship: the junction type and the four mapped key members that connect the two principal sides through the junction.

public sealed class RelationshipJunctionMetadata
Inheritance
RelationshipJunctionMetadata
Inherited Members
Extension Methods

Remarks

The two principal sides each declare an ordered key (ParentKey, ChildKey); the junction declares the two foreign keys pointing at them (JunctionParentForeignKey, JunctionChildForeignKey). Every list keeps its declaration/selector order, and each junction foreign-key component at position i pairs positionally with the component at position i of the key it references; the two lists of a leg have the same arity after resolution. An instance is published through Junction and read concurrently.

Constructors

RelationshipJunctionMetadata(Type, IReadOnlyList<IPropertyMetadata>, IReadOnlyList<IPropertyMetadata>, IReadOnlyList<IPropertyMetadata>, IReadOnlyList<IPropertyMetadata>)

Initializes the junction metadata from its resolved mapped members.

public RelationshipJunctionMetadata(Type junctionType, IReadOnlyList<IPropertyMetadata> parentKey, IReadOnlyList<IPropertyMetadata> childKey, IReadOnlyList<IPropertyMetadata> junctionParentForeignKey, IReadOnlyList<IPropertyMetadata> junctionChildForeignKey)

Parameters

junctionType Type

The CLR type of the junction entity.

parentKey IReadOnlyList<IPropertyMetadata>

The parent-side key members, resolved from the parent entity metadata.

childKey IReadOnlyList<IPropertyMetadata>

The child-side key members, resolved from the child entity metadata.

junctionParentForeignKey IReadOnlyList<IPropertyMetadata>

The junction members that reference the parent key.

junctionChildForeignKey IReadOnlyList<IPropertyMetadata>

The junction members that reference the child key.

Exceptions

ArgumentNullException

An argument is null.

Properties

ChildKey

The child-side key members, resolved from the child entity metadata.

public IReadOnlyList<IPropertyMetadata> ChildKey { get; }

Property Value

IReadOnlyList<IPropertyMetadata>

JunctionChildForeignKey

The junction members that reference ChildKey.

public IReadOnlyList<IPropertyMetadata> JunctionChildForeignKey { get; }

Property Value

IReadOnlyList<IPropertyMetadata>

JunctionParentForeignKey

The junction members that reference ParentKey.

public IReadOnlyList<IPropertyMetadata> JunctionParentForeignKey { get; }

Property Value

IReadOnlyList<IPropertyMetadata>

JunctionType

The CLR type of the junction (link) entity.

public Type JunctionType { get; }

Property Value

Type

ParentKey

The parent-side key members, resolved from the parent entity metadata.

public IReadOnlyList<IPropertyMetadata> ParentKey { get; }

Property Value

IReadOnlyList<IPropertyMetadata>