Skip to main content
Powersheet-Only ConceptCardinality is a Powersheet data model concept. Polarion link roles do not have a cardinality setting — Powersheet uses the cardinality value to control how the sheet renders and navigates relationship data.

Cardinality Property

The cardinality property is declared within each entry of the relationships array in the data model YAML. It works together with from, to, storage, linkRole, direct, and back to form a complete relationship definition.

Supported Cardinality Values

These are the only two values. Any other value, including one-to-many and one-to-one, stops the data model from loading.
Modeling One-to-ManyThere is no one-to-many value. To give each parent many children, declare the relationship as many-to-one from the child side: from is the child entity type, to is the parent. The child’s direct navigation property is then a single reference to its parent, and the parent’s back navigation property is the collection of its children, which the sheet shows as child rows. See One-to-Many (1:N).The link is read in the direction from the from work item to the to work item, so in Polarion each child must hold the link to its parent. If your links run the other way, with the parent holding a link to each child, use many-to-many with the parent as from.
one-to-one Not SupportedThe one-to-one cardinality value is not currently supported. To model a strict 1:1 relationship, use many-to-one and enforce the single-target constraint through workflow or validation.

How the Three Configuration Layers Connect

The data model, sheet sources, and sheet columns are connected through navigation property names. The cardinality of a relationship determines which expand pattern and column binding syntax to use.
  • Data model defines entity types and relationships (including cardinality, direct, and back navigation property names)
  • Sheet sources define how to query and expand those relationships using the navigation property names
  • Sheet columns define how to display the resulting data using binding paths derived from the same navigation property names
diagram

Shared Data Model for Examples

All examples on this page use the following minimal data model:

Many-to-One (N:1)

Scenario: Each UserNeed belongs to exactly one Chapter. The relationship uses the direct direction with name: chapter (singular, scalar navigation property). Because the cardinality is many-to-one, the navigation property on the “from” side points to a single entity.

Relationship Definition

Source Configuration

The expand uses the direct navigation property name chapter. Because it is a scalar property (N:1), the expand resolves to a single related entity per row.

Column Configuration

Scalar vs. CollectionA singular navigation property name (e.g., chapter) indicates a N:1 cardinality. The sheet renders this as a single-value reference picker, not an expandable child level.

One-to-Many (1:N)

Scenario: Each Chapter has multiple child UserNeed items. This is the reverse side of the many-to-one relationship above. It uses the back direction with name: userNeeds (plural, collection navigation property).

Relationship Definition

The same relationship entry is used — the 1:N perspective is simply the back direction of the N:1 relationship:
When querying from Chapter, the back.name value userNeeds provides the collection navigation property.

Source Configuration

The expand uses the back navigation property name userNeeds. Because it is a collection property (1:N), the expand creates child rows underneath each Chapter.

Column Configuration

No Dot-Notation for ExpansionWhen a collection navigation property is used as a column key, it opens a new sheet level with child rows. No dot-notation is needed — the expand directly opens the child level.

Many-to-Many (M:N)

Scenario: UserNeed items are linked to multiple SystemRequirement items, and vice versa. Many-to-many relationships use an association entity as an intermediate layer. The source expand is two levels deep, and column binding uses dot-notation to reach through the association to the target entity.

Relationship Definition

Source Configuration

The expand is two levels:
  1. systemRequirements — navigates to the association entity (collection)
  2. systemRequirement — navigates from the association to the actual target entity (scalar)

Column Configuration

Two-Level Expand RequiredM:N relationships always require a two-level expand in the source configuration. If you omit the inner expand (- name: systemRequirement), the column will bind to the association entity rather than the target entity, and data will not display correctly.
The navigation property names declared in direct and back follow consistent naming conventions that signal the cardinality:
Naming Signals CardinalitySingular navigation property names (e.g., chapter) indicate scalar references (N:1). Plural names (e.g., userNeeds) indicate collections (1:N or M:N). Consistent naming makes sheet configurations easier to read and debug.

Relationship Context Properties

Each relationship entry that includes a cardinality value also requires the following sibling properties: The direct and back objects each contain a name property that defines the navigation property used in source expands and column binding paths.

Cardinality Summary

Complete YAML Example

A full data model demonstrating all cardinality patterns with the standard RTM entity set: