Structure
Relationships are defined as an array at the top level of the domain model YAML, alongside domainModelTypes:
relationships :
- from : UserNeed
to : SystemRequirement
cardinality : one-to-many
storage : linkedWorkItems
linkRole : refines
fromNavPropName : systemRequirements
toNavPropName : userNeed
Relationship Properties
Property Type Default Description fromstringRequired Source entity type name. Must match a key in domainModelTypes. tostringRequired Target entity type name. Must match a key in domainModelTypes. cardinalitystringRequired Relationship multiplicity. See Cardinality . storagestringRequired Persistence mechanism. See Storage . linkRolestringRequired (when storage is linkedWorkItems) Polarion link role ID. See Link Roles . fromNavPropNamestringSee application Navigation property name added to the source (from) entity for forward traversal. toNavPropNamestringSee application Navigation property name added to the target (to) entity for reverse traversal.
The from and to fields must reference names defined in domainModelTypes — not Polarion work item type IDs. For example, use UserNeed (the entity type name), not userNeed (the Polarion type ID).
Alternative Navigation Property Syntax
Instead of fromNavPropName and toNavPropName, relationships can use the direct and back object syntax:
Property Type Default Description directobjectNone Forward navigation property configuration. direct.namestringRequired Navigation property name for forward traversal (from source to target). backobjectNone Reverse navigation property configuration. back.namestringRequired Navigation property name for reverse traversal (from target back to source).
relationships :
- from : UserNeed
to : SystemRequirement
cardinality : one-to-many
storage : linkedWorkItems
linkRole : refines
direct :
name : systemRequirements
back :
name : userNeed
Both syntaxes are equivalent. The direct/back format supports additional properties for permission control on the navigation direction.
Cardinality Options
Value From Side To Side one-to-oneSingle reference Single reference many-to-oneSingle reference Collection one-to-manyCollection Single reference many-to-manyCollection Collection
See Cardinality for detailed documentation.
Storage Mechanisms
Value Description linkedWorkItemsUses Polarion’s native work item link mechanism. Requires linkRole. customFieldStores references in custom fields.
See Storage for detailed documentation.
Navigation Properties in Binding Paths
Navigation property names created by relationships are used in sheet configuration binding paths. For example, with the relationship above, a column can display the linked system requirement’s title:
columns :
systemRequirements.systemRequirement.title :
title : System Requirement
width : 200
The binding path follows: systemRequirements (navigation property on UserNeed) -> systemRequirement (the expanded entity) -> title (the property).
Permission Control on Relationships
Relationships support permission flags that control whether links can be created or read:
Property Type Default Description createablebooleanSee application Whether new relationship instances can be created through the sheet readablebooleanSee application Whether relationship instances are visible in queries
The exact behavior of permission flags on relationships may vary. Test in your environment to confirm.
Complete YAML Example
domainModelTypes :
UserNeed :
polarionType : userNeed
properties :
description : null
severity : null
SystemRequirement :
polarionType : systemRequirement
properties :
description : null
component : null
DesignRequirement :
polarionType : designOutput
properties :
description : null
Hazard :
polarionType : hazard
properties :
description : null
RiskControl :
polarionType : riskControl
properties :
description : null
ExternalReference :
properties :
systemId : null
link : null
relationships :
- from : UserNeed
to : SystemRequirement
cardinality : one-to-many
storage : linkedWorkItems
linkRole : refines
direct :
name : systemRequirements
back :
name : userNeed
- from : SystemRequirement
to : DesignRequirement
cardinality : one-to-many
storage : linkedWorkItems
linkRole : refines
direct :
name : designRequirements
back :
name : systemRequirement
- from : Hazard
to : RiskControl
cardinality : many-to-many
storage : linkedWorkItems
linkRole : mitigates
direct :
name : riskControls
back :
name : hazards
- from : ExternalReference
to : DesignRequirement
cardinality : many-to-one
storage : linkedWorkItems
linkRole : relatesTo
direct :
name : designRequirement
back :
name : externalReferences
Related Pages
KB Articles Source Code
prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/constraints_create_only.yaml
model.yaml
prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/constraints-base.yaml
DomainModelV2.java
prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/constraints_currentDocument_downstream.template.yaml