Direction Overview
Every relationship in the data model connects afrom entity type to a to entity type. The direct direction creates a navigation property on the from entity that points toward the to entity. The back direction creates a navigation property on the to entity that points back toward the from entity.
UserNeed to SystemRequirement. The forward (direct) navigation property systemRequirements is placed on UserNeed, while the reverse (back) navigation property userNeeds is placed on SystemRequirement.
Direction Properties
Direct (Forward) Direction
Thedirect property defines the navigation property created on the source (from) entity type. It controls how the from entity navigates toward the to entity.
Back (Reverse) Direction
Theback property defines the navigation property created on the target (to) entity type. It enables reverse traversal from the to entity back to the from entity.
Every relationship requires both a
direct and a back definition. Even if you only intend to traverse in one direction, you must provide names for both sides so the data model can fully resolve the bidirectional link.Naming Conventions
Navigation property names follow consistent conventions that signal the cardinality and direction of the relationship:Relationship Declaration Syntax
Thedirect and back objects are nested inside each relationship entry in the relationships array of the data model YAML.
Basic Declaration
direct.name: systemRequirementsis added to theUserNeedentity type, allowing traversal from user needs to their linked system requirements.back.name: userNeedsis added to theSystemRequiremententity type, allowing reverse traversal from system requirements back to user needs.
Many-to-One Declaration
direct.name: chapter is singular because each UserNeed belongs to exactly one Chapter. The back.name: userNeeds is plural because each Chapter may contain multiple user needs.
Navigation with Constraints
Thedirect/back syntax supports attaching constraints to individual navigation directions. Constraints filter which entities are visible when expanding, picking, or creating through a particular direction.
Each direction object supports three constraint scopes:
Constraint on Back Direction
userNeeds back-navigation property is filtered to only include items from documents that share the same component as the source entity’s document. The $context.source.document.component expression dynamically resolves the component value at runtime. See Context Expressions Reference for the full expression syntax.
Constraint on Direct Direction
pick constraint on the designRequirements direct-navigation property restricts the picker dialog to only show design requirements from documents in the Design module folder.
How Directions Map to Cardinality
The cardinality of the relationship determines how the navigation property behaves at runtime. The direction (direct vs back) combined with the cardinality determines whether a property resolves to a single entity or a collection.
The data model does not support
one-to-one cardinality. Relationships must be declared as many-to-one, one-to-many, or many-to-many. To model a one-to-one association, use many-to-one and enforce uniqueness through constraints or workflow rules.Using Navigation Properties in Column Bindings
Navigation property names become the segments of dot-separated binding paths in sheet configuration columns. The binding path pattern depends on the cardinality:Scalar Navigation (N:1)
Formany-to-one relationships using the direct direction, the navigation property resolves to a single entity. Column bindings access properties directly:
chapterprovides a single-value reference picker (scalar navigation property).chapter.titleaccesses thetitlefield of the referencedChapterentity.
Collection Navigation (1:N)
Forone-to-many relationships, the navigation property expands into child rows:
userNeeds column triggers expansion into a new sheet level showing all child user needs. No dot-notation is needed since the expand directly opens the child level.
Association Navigation (M:N)
Formany-to-many relationships, column binding uses a two-part path through the association entity:
<associationNavProp>.<targetEntityNavProp>. The first segment (systemRequirements) navigates to the association collection; the second segment (systemRequirement) resolves to the target entity. This acts as a multi-item reference picker.
Expansion Paths and Sources
Navigation property names are referenced in thesources configuration to define which related entities are loaded when the sheet expands. The expand list uses direct.name or back.name values to traverse the entity graph:
name in the expand tree must match a navigation property defined by a direct or back direction on the queried entity type. The nesting depth determines how many levels of related entities are loaded. See Sources and Expand Clause for full details.
Complete YAML Example
The following data model demonstrates navigation directions across a multi-level RTM hierarchy with constraints:Quick Reference: Direction Summary
Related pages: Relationships | Cardinality | Binding Syntax | Sources | Expand Clause | Constraints