Skip to main content
diagram

Structure

Relationships are defined as a top-level array in the data model YAML, alongside domainModelTypes:
Each entry connects a source entity type (from) to a target entity type (to), specifies a cardinality, a storage mechanism, a link role, and two navigation properties that allow traversal in both directions.

Relationship Properties

from/to reference entity type namesThe 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 user_need (the Polarion type ID).
Every relationship creates navigation properties on the participating entity types. These properties enable:
  • Expansion paths in sheet source configurations
  • Column bindings using dot-notation in sheet column definitions
  • Query traversal across related entity types
Navigation properties are defined using the direct and back objects:
In this example:
  • UserNeed gains the navigation property chapter (forward, to the Chapter entity)
  • Chapter gains the navigation property userNeeds (reverse, back to UserNeed entities)

Naming Conventions

Use camelCase for navigation property namesNavigation property names follow camelCase convention. Use singular names for scalar references and plural names for collection references. This naming directly maps to source expand entries and column binding paths.

Cardinality Options

The cardinality property determines how many entities can participate on each side of the relationship: Cardinality affects three layers of configuration:
  1. Data model — determines navigation property type (scalar vs. collection)
  2. Sheet sources — determines expand pattern (single-level vs. two-level for M:N)
  3. Sheet columns — determines binding syntax and UI behavior (picker vs. child rows)
See Cardinality for complete documentation on each option.

Storage

The storage property specifies how the relationship is persisted in Polarion.
linkedWorkItems is the storage for links between work itemsEvery relationship between two work item types uses linkedWorkItems. It leverages Polarion’s built-in linked work items infrastructure, which stores relationships as typed links between work items using the configured linkRole.
The linkRole value must correspond to a link role defined in the Polarion project configuration. Common link roles used in data models: See Link Roles for detailed documentation on configuring and using Polarion link roles.

Test Records Storage

storage: TestRecords relates a test record type to the type it is read beneath. It is not a link: no linkRole and no cardinality apply, and the relationship can be written from either end.
  • direct.name and back.name replace the derived names. The record’s key to the other end is the navigation name followed by Id, such as testRunId. As on any relationship, direct names the navigation on the from type and back the one on the to type.
  • One end must be a test record type and the other a work item type or a test run type. Any other pairing is rejected with an error that names both types.
  • If from or to names a type that domainModelTypes does not define, that name becomes the test record type, with all of its properties. A record type that the model relates to no test run is related to one automatically — the model’s own test run type, or a type named TestRun when it has none.
See Test Record and Test Run Types for the types and Test Records for which records a sheet loads.

Permission Control

Relationships support permission flags that control CRUD operations through the sheet:
Verify in applicationPermission flag behavior may depend on your Polarion project permissions and Powersheet version. Test in your environment to confirm the exact behavior.
Navigation property names created by relationships flow directly into sheet configuration. The three configuration layers — data model, sheet sources, and sheet columns — are connected through these navigation property names. The cardinality of the relationship determines the expand pattern and column binding syntax.

Many-to-One (N:1)

A scalar reference from source to a single target entity. Uses the direct navigation property. Data model:
Source configuration:
Column bindings:
  • chapter — single-value reference picker (scalar navigation property, N:1)
  • chapter.title — read-only display of the referenced Chapter’s title via dot-notation

One-to-Many (1:N)

A collection of child entities accessible from a parent. Uses the back navigation property (reverse side of a many-to-one relationship). Source configuration:
Column bindings:
  • userNeeds — expands into child rows, creating a new level in the sheet hierarchy
  • No dot-notation needed; the expand directly opens the child level

Many-to-Many (M:N)

Collections on both sides, navigated through an association entity. Uses a two-level expand. Data model:
Source configuration:
Column bindings:
  • M:N relationships use an association entity between the two types
  • Source expand is two levels: systemRequirements (association) then systemRequirement (target entity)
  • Column binding uses dot-notation: systemRequirements.systemRequirement
  • Acts as a multi-item reference picker in the sheet UI

Cardinality Summary

Complete YAML Example

A full data model demonstrating all relationship cardinalities across the standard RTM entity types:
This model creates a full traceability chain: Chapter > UserNeed > SystemRequirement > DesignRequirement > Hazard > RiskControl. Each relationship uses linkedWorkItems storage with an appropriate Polarion link role, and defines both direct and back navigation properties for bidirectional traversal.
  • Cardinality — detailed rules for each cardinality option
  • Link Roles — configuring Polarion link roles for relationships
  • Data Model Types — entity type definitions referenced by from and to
  • Navigation Directions — how direction properties work internally
  • Binding Syntax — using navigation properties in column bindings
  • Sources — configuring expand paths that use navigation properties
  • Constraints — filtering constraints applied to entity types in relationships
  • Test Records — how the TestRecords storage brings test results into a sheet