Prerequisites
- Both entity types must already exist in your
domainModelTypessection - A Polarion link role must be configured in your project for the relationship
- Access to the domain model YAML via Menu > Configuration > Edit Model
Step 1: Identify the Relationship
Determine the source and target entity types, the cardinality, and which Polarion link role to use.| Decision | Question | Example |
|---|---|---|
Source (from) | Which entity owns the relationship? | UserNeed |
Target (to) | Which entity is being referenced? | SystemRequirement |
| Cardinality | How many targets per source? | one-to-many |
| Link role | Which Polarion link role stores this? | relates_to |
Step 2: Add the Relationship
Add an entry to therelationships array in your domain model YAML.
Relationship Properties
| Property | Type | Required | Description |
|---|---|---|---|
from | string | Yes | Source entity type name. Must match a domainModelTypes key exactly. |
to | string | Yes | Target entity type name. Must match a domainModelTypes key exactly. |
cardinality | string | Yes | Multiplicity: one-to-many, many-to-one, or many-to-many. |
storage | string | Yes | Persistence mechanism. Use linkedWorkItems for Polarion link-based relationships. |
linkRole | string | Yes | Polarion link role ID. Must exist in your project’s link role configuration. |
fromNavPropName | string | Yes | Navigation property name on the source entity for forward traversal. |
toNavPropName | string | Yes | Navigation property name on the target entity for reverse traversal. |
Step 3: Choose Navigation Property Names
Navigation property names are used in sheet configuration binding paths and query expansion paths. Follow these naming conventions:- Forward (
fromNavPropName): Use the plural form of the target entity in camelCase — e.g.,systemRequirements - Reverse (
toNavPropName): Use the plural form of the source entity in camelCase — e.g.,userNeeds
Step 4: Update Sheet Sources
After adding the relationship, update thesources section in your sheet configuration to include the expansion path:
Step 5: Verify
- Save both the domain model and sheet configuration
- Reload the powersheet document
- You should now see the related entities loading in the sheet hierarchy
Alternative Format: direct/back Syntax
Some models use an alternative syntax withdirect and back objects instead of fromNavPropName/toNavPropName:
direct/back syntax allows additional per-direction configuration such as permissions.
Cardinality Options
| Cardinality | Meaning | Use Case |
|---|---|---|
one-to-many | One source links to multiple targets | Parent-child hierarchies |
many-to-one | Multiple sources link to one target | Lookup references |
many-to-many | Multiple sources link to multiple targets | Cross-references |
See Also
- Create an Entity Type — prerequisite: define entity types first
- Create Bidirectional Links — detailed bidirectional navigation setup
- Configure Many-to-Many Relationships — complex relationship patterns
- Relationships — full reference for relationship properties
- Cardinality — multiplicity options and behavior
- Link Roles — Polarion link role configuration
Sources
Sources
KB Articles
- Getting Started: Data Model configuration
- Model Helper
- How to Add a New Column for External References Linked to Design Outputs
DomainModelV2.javamodel.yamlriskmanagement_model.yamlprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/constraints_create_only.yamlprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/constraints-base.yaml