How Expansion Works
When you define a source query with afrom entity type, only that entity type’s properties are loaded by default. To include related entities (e.g., SystemRequirement items linked to a UserNeed), you define expansion paths that follow navigation properties from the domain model.
Each expansion path tells the query engine to fetch related entities along a defined relationship and include them as nested rows in the sheet.
Step 1: Add a Single-Level Expansion
In thesources section of your sheet configuration YAML, add an expand array to the source:
name property must match a navigation property defined in your domain model for the UserNeed entity type. The title is displayed as a label in the sheet header for the expanded section.
Step 2: Add Nested (Multi-Level) Expansion
For deeper hierarchies, nestexpand entries within each other:
UserNeed > SystemRequirement > DesignRequirement. Each level appears as nested rows in the sheet, with columns bound to the appropriate entity type at each level.
Step 3: Expand Many-to-Many Relationships
For many-to-many relationships that use association entities, use a two-level dot-notation path in your column bindings:systemRequirements) navigates to the association entity, and the second segment (systemRequirement) navigates through to the target entity. Set multiItem: true on columns that display collections.
Step 4: Use Column Bindings with Expanded Entities
Columns that display properties from expanded entities use dot-notation binding paths:Step 5: Apply Document-Scoped Expansion
You can constrain expanded entities to the current document by addingconstraints to the source:
applyCurrentDocumentTo constraint filters expanded SystemRequirement entities to only include those from the same Polarion document context.
Verification
After saving the configuration and opening the document:- You should now see parent entities with expandable nested rows for each expanded navigation property
- Column bindings with dot-notation paths should display values from the related entity types
- Multi-level expansions should render as a hierarchical tree in the sheet
See Also
- Write an Entity Query — set up the base source query
- Configure Sources — full source configuration details
- Configure a Relationship — define navigation properties in the domain model
- Configure Many-to-Many Relationships — set up association-based relationships
- Filter by Document — apply document constraints to queries
Sources
Sources
Source Code
PolarionQueryProcessor.javaExpandClause.javapowersheet.yamlprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/constraints_composing.template.yamlprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/constraints_currentDocument_downstream.template.yaml