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 data model YAML file in your project’s SVN repository
1
Identify the Relationship
Determine the source and target entity types, the cardinality, and which Polarion link role to use.
2
Add the Relationship to Your Data Model
Add an entry to the
relationships array in your data model YAML. Each relationship uses direct and back objects to define the forward and reverse navigation property names.Relationship Properties
3
Choose Navigation Property Names
The
direct.name and back.name values define how you traverse the relationship in sheet configurations, expansion paths, and column bindings. Follow these naming conventions:- Forward (
direct.name): Use the plural camelCase form of the target entity — e.g.,systemRequirementswhen the target isSystemRequirement - Reverse (
back.name): Use the plural camelCase form of the source entity — e.g.,userNeedswhen the source isUserNeed
many-to-one relationships, the forward navigation property should be singular (scalar), since it references exactly one target:4
Configure by Cardinality
The cardinality you choose affects how sources expand and how columns bind. Use the following patterns.
Many-to-One (N:1)
Each source entity references exactly one target. Thedirect.name is singular.One-to-Many (1:N)
Each source entity has multiple children. This is the reverse side of a many-to-one relationship, using theback.name collection property.Many-to-Many (M:N)
Both sides can reference multiple entities. The expand uses an association entity pattern with two levels of expansion.5
Verify the Relationship
After saving the data model YAML:
- Open a Powersheet that uses this data model
- Expand the source entity to confirm child rows or linked items appear
- Check that column bindings resolve correctly — the referenced entity properties should display their values
- The
fromandtovalues match entity type names indomainModelTypesexactly (case-sensitive) - The
linkRolevalue exists in your Polarion project’s link role configuration - The
sources.modelproperty in your sheet configuration matches your custom data model name
Quick Reference
See Also
- Create an Entity Type — define the entity types before adding relationships
- Create Bidirectional Links — advanced bidirectional linking patterns
- Configure Many-to-Many Relationships — detailed M:N configuration
- Data Model Reference — complete property reference for data models
- Cardinality Reference — supported cardinality values and their behavior
- Configure Sources — connect relationships to sheet expansion paths
- Add a Column — bind columns to relationship navigation properties