Skip to content

Relationship

Namespace: DataWarehouseAutomation.DwaModel
Assembly: DataWarehouseAutomation.dll

A relationship from one data object to another. This can apply at conceptual, logical, and physical level. The intent of this class is to support lineage relationships (e.g. parent/child) as well as foreign keys and sub- and supertypes.

public class Relationship

objectRelationship

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Cardinality of the relationship, e.g. 0 or 1 to many, 1 (and only one) to 1, or zero or many.

[JsonPropertyName("cardinality")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Cardinality? Cardinality { get; set; }

Cardinality?

Free-form and optional classification for the relationship.

[JsonPropertyName("classifications")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<DataClassification>? Classifications { get; set; }

List<DataClassification>?

The collection of individual attribute (column or query) mappings, containing the data items that apply to the relationship.

[JsonPropertyName("dataItemMappings")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<DataItemMapping>? DataItemMappings { get; set; }

List<DataItemMapping>?

The collection of extension Key/Value pairs.

[JsonPropertyName("extensions")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<Extension>? Extensions { get; set; }

List<Extension>?

An optional identifier for the relationship.

[JsonPropertyName("id")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Id { get; set; }

string?

The mandatory name of the relationship.

[JsonPropertyName("name")]
public string? Name { get; set; }

string?

Free-format notes.

[JsonPropertyName("notes")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Notes { get; set; }

string?

The related data object, This is nullable to allow creating the object before selecting the target / ‘to’ object, the relatedDataObject. Conceptually, a relationship is expected to have a data object target.

[JsonPropertyName("relatedDataObject")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public IDataObject? RelatedDataObject { get; set; }

IDataObject?

The type of relationship. This is a free-format field that acts as a label. For example, parent, child, grandfather, or lookups.

[JsonPropertyName("type")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Type { get; set; }

string?

Used to assert whether two Entities are the same, based on their Ids.

public override bool Equals(object? obj)

obj object?

Comparison Entity

bool

true if the Entities have the same Id

Generates a Hash Code derived from the Entity’s Id.

public override int GetHashCode()

int

Hash Code

String representation override for the Entity

public override string ToString()

string

The Name Attribute