Class RelationshipJunctionMetadata
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
junctionTypeTypeThe CLR type of the junction entity.
parentKeyIReadOnlyList<IPropertyMetadata>The parent-side key members, resolved from the parent entity metadata.
childKeyIReadOnlyList<IPropertyMetadata>The child-side key members, resolved from the child entity metadata.
junctionParentForeignKeyIReadOnlyList<IPropertyMetadata>The junction members that reference the parent key.
junctionChildForeignKeyIReadOnlyList<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
JunctionChildForeignKey
The junction members that reference ChildKey.
public IReadOnlyList<IPropertyMetadata> JunctionChildForeignKey { get; }
Property Value
JunctionParentForeignKey
The junction members that reference ParentKey.
public IReadOnlyList<IPropertyMetadata> JunctionParentForeignKey { get; }
Property Value
JunctionType
The CLR type of the junction (link) entity.
public Type JunctionType { get; }
Property Value
ParentKey
The parent-side key members, resolved from the parent entity metadata.
public IReadOnlyList<IPropertyMetadata> ParentKey { get; }