What Navigation Properties Are
A navigation property is a named reference on an entity type that points to one or more related entities of a different type. When you define a relationship between two entity types in your domain model, Powersheet automatically generates navigation properties on both sides of the relationship. These properties become the building blocks for binding paths in your sheet configuration and for expansion paths in your data sources. For example, when you define a relationship fromUserNeed to SystemRequirement, two navigation properties are created:
- A forward (direct) property on
UserNeedpointing to its relatedSystemRequiremententities - A backward (back) property on
SystemRequirementpointing back to the originatingUserNeed
fromNavPropName (or direct.name) and toNavPropName (or back.name) in the relationship definition.
How Navigation Properties Are Named
Navigation property names are defined in therelationships section of the domain model YAML. There are two naming conventions, depending on which relationship syntax you use:
| Syntax Style | Forward Property | Backward Property |
|---|---|---|
| Flat style | fromNavPropName | toNavPropName |
| Nested style | direct.name | back.name |
How Navigation Properties Enable Hierarchical Views
Navigation properties are the mechanism that makes hierarchical sheet rendering possible. When the sheet loads data, it uses expansion paths defined in thesources section to follow navigation properties and load related entities. Each expansion step traverses one navigation property, creating a new level in the row hierarchy.
The sheet computes row levels from column binding paths. The root entity is always level 0 (the upstream level). Each navigation property traversal creates a downstream level, allowing the sheet to display parent-child relationships as nested rows. For example, a binding path of systemRequirements.systemRequirement.title creates a level 1 row for each SystemRequirement beneath its parent UserNeed.
Built-In Navigation Properties
Every entity type in Powersheet automatically receives two built-in navigation properties, regardless of what you define in therelationships section:
| Property | Target | Description |
|---|---|---|
document | Document | Links the entity to its containing Polarion document |
project | Project | Links the entity to its Polarion project |
Navigation Properties and Cardinality
The cardinality of a relationship directly affects how navigation properties behave:| Cardinality | Forward Property Returns | Back Property Returns |
|---|---|---|
one-to-one | Single entity | Single entity |
one-to-many | Collection of entities | Single entity |
many-to-one | Single entity | Collection of entities |
many-to-many | Collection of entities | Collection of entities |
multiItem: true in the sheet configuration.
Navigation Properties in Binding Paths
In the sheet configuration, binding paths (column keys) chain navigation property names together with dot separators to reach properties on related entities. Each segment of the path corresponds to a navigation property traversal.systemRequirements.systemRequirement) represents a navigation property name followed by the entity type alias for that level. This pattern enables the sheet to render deeply nested hierarchies across the entire traceability chain.
The exact behavior of navigation property resolution for deeply nested paths (beyond three levels) should be verified in your specific Powersheet configuration, as performance characteristics may vary with depth.
Related Pages
- Entity Types and Relationships — how entity types and their connections are defined
- Link Cardinality — how cardinality affects navigation behavior
- Hierarchy and Traceability — how navigation properties enable traceability matrices
- Data Model vs Sheet Configuration — where navigation properties fit in the configuration layers
Sources
Sources
Source Code
MetadataTest.javaDatabridgeMetadata.javaRelationship.javatodosBig_model.yamlprod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/__tests__/test-viewModel.ts