Why Cardinality Matters
Siemens Polarion ALM allows any work item to link to any number of other work items through link roles. This open-ended flexibility means Polarion itself does not enforce limits like “a hazard must link to at least one risk control” or “a system requirement should derive from exactly one user need.” Powersheet’s domain model introduces cardinality as a semantic layer on top of Polarion’s link roles. Think of it like database schema design: just as a relational database enforces foreign key constraints, Powersheet’s cardinality settings enforce relationship multiplicity in the user interface.Cardinality Options
Thecardinality property on a relationship definition accepts four values:
| Cardinality | From Side | To Side | Typical Use Case |
|---|---|---|---|
one-to-one | Single | Single | Requirement to unique verification |
many-to-one | Multiple | Single | Many design reqs derive from one system req |
one-to-many | Single | Multiple | One user need decomposes into many system reqs |
many-to-many | Multiple | Multiple | Hazards linked to multiple risk controls and vice versa |
How Cardinality Is Defined
Cardinality is set on each relationship in therelationships array of the domain model YAML:
UserNeed can link to many SystemRequirement items (one-to-many). The fromNavPropName becomes a collection-valued property on UserNeed, while toNavPropName becomes a single-valued property on SystemRequirement.
Impact on the User Interface
Cardinality directly controls the sheet’s editing behavior:- Single-value relationships (the “one” side) display a single-select picker. The user can choose exactly one target entity.
- Multi-value relationships (the “many” side) display a multi-select picker. The user can select multiple related entities.
Cardinality and Polarion Link Roles
Polarion link roles are inherently many-to-many — any work item can create any number of links using a given role. Powersheet’s cardinality setting does not change this at the Polarion level; instead, it enforces the constraint at the UI and validation level within the sheet. This means:- If a relationship is defined as
many-to-one, the sheet will present a single-value picker and prevent users from creating additional links through the powersheet - Links created outside Powersheet (via Polarion’s native UI) are not retroactively constrained
The exact enforcement behavior for cardinality violations (whether existing extra links are hidden or shown with a warning) may vary. Test with your configuration to confirm.
Common RTM Cardinality Pattern
A typical Requirements Traceability Matrix uses the following cardinality chain:| From | To | Cardinality | Link Role |
|---|---|---|---|
UserNeed | SystemRequirement | one-to-many | refines |
SystemRequirement | DesignRequirement | one-to-many | refines |
Hazard | RiskControl | many-to-many | mitigates |
Related Pages
- Entity Types and Relationships — How entity types and relationships are structured
- Process Constraints — Additional rules for loading, creating, and picking entities
- Creating Your First Data Model — Hands-on tutorial for setting up cardinality
Sources
Sources
Source Code
riskmanagement_model.yamlprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/constraints_pick_only.yamlsf_model.yamlprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/constraints_create_only.yamlRelationship.java