Skip to content

RelationDefinition

Describes a Relation from a Template or Union to a Template or Union with a declared cardinality.

The Builder registers each Relation on its target’s toRelations under toKey once every App is built, expanding a Union target to each member Template; a toKey already in use on the target is a build error.

readonly cardinality: RelationCardinality

Cardinality as declared from the from side.


readonly optional eventPrn?: string

PRN of the Event published when the Relation is set, added to, removed from or cleared; present when the Relation was declared with evented(). The Event payload carries action, otherId and relationPrn.


readonly fromKey: string

Key under which the from Template or Union exposes the Relation.


readonly fromTemplatePrn: string

PRN of the Template or Union the Relation is declared on; it is also the prefix of the Relation’s own PRN.


readonly prn: string

PRN of the Relation, <fromTemplatePrn>/relation/<fromKey>.


readonly toKey: string

Key under which the target exposes the reverse side, in its toRelations.


readonly toPrn: string

PRN of the target Template or Union.