Skip to main content
See also: Data Model Types | Properties | Relationships

Mapping Architecture

diagram

Core Mapping Properties

When polarionType is omitted, the entity type name (the YAML map key) is used as the Polarion work item type ID. For example, an entity named Task with no explicit polarionType maps to Polarion work item type Task.

polarionType Property

Single Type Mapping (Scalar)

The most common pattern maps one entity type to one Polarion work item type using a scalar string value:
In this configuration, the UserNeed entity type maps to the Polarion work item type ID user_need. All queries for UserNeed entities resolve to work items of type user_need.

Multi-Type Mapping (Array)

A single entity type can map to multiple Polarion work item types by providing an array. This enables a unified view over work items of different types:
When polarionType is an array:
  • Queries for the Requirement entity type return work items matching any of the listed types
  • The first type in the array is used as the default when creating new work items
  • All listed type IDs must exist in the Polarion project configuration
When an entity maps to multiple Polarion types, queries produce a combined result set. Filter predicates and constraints apply uniformly across all mapped types. Properties referenced in column bindings must exist on all mapped types, or the value will be empty for types that lack the field.
For complete guidance on multi-type entity configuration, see Create an Entity Type.

Omitted polarionType (Default Mapping)

When polarionType is not specified, the entity type name becomes the Polarion type ID:
The Hazard entity maps to Polarion work item type Hazard. This convention works when the entity type name exactly matches the Polarion work item type ID defined in the project.

polarionProto Property

The polarionProto property specifies which Polarion prototype (object class) the entity represents. Most entity types use the default IWorkItem.PROTO, but special object types require an explicit prototype.
Available prototype values are enumerated from the Polarion platform at runtime. The JSON schema generator reads all valid prototype names to populate the polarionProto enum constraint for IDE validation.

Schema Validation

The JSON schema generated by Powersheet validates polarionProto values against the set of prototypes available on the Polarion server. When editing data model YAML files with schema support enabled, the IDE provides:
  • Autocomplete for valid polarionProto values
  • Validation errors for unrecognized prototypes
  • Type checking for polarionType (accepts both string and array)

Built-in Entity Types

Powersheet recognizes several built-in entity types that map to Polarion objects. These types have specialized handling in the query processor and metadata system.
The Document entity type supports polarionType. When set, it filters documents to those matching a specific document type ID. This is useful for constraining picker dialogs and queries to a particular class of documents.

Reserved Properties

Built-in entity types have reserved properties that are always set to false in the data model schema:

Type Mapping in Relationships

Relationship definitions reference entity types by their data model name (the YAML map key), not by their Polarion work item type ID:
The from and to fields in relationships must use data model entity type names (UserNeed, SystemRequirement), not Polarion work item type IDs (user_need, sys_req). Powersheet resolves the Polarion type mapping internally when executing queries.

Relationship Navigation and Type Resolution

When a relationship links two entity types, Powersheet resolves the polarionType of each entity to construct the appropriate Polarion query:
  1. The from entity type’s polarionType identifies the source work item type
  2. The to entity type’s polarionType identifies the target work item type
  3. The linkRole maps to the Polarion link role connecting them
  4. direct and back properties create navigation properties for traversal in each direction
In this example:
  • Navigating direct (systemRequirements) from a UserNeed queries Polarion for sys_req work items linked via the decomposes link role
  • Navigating back (userNeeds) from a SystemRequirement queries Polarion for user_need work items linked via the reverse of decomposes

Query Behavior with Type Mappings

The query processor uses polarionType mappings when translating data model queries to Polarion Lucene queries:

Security and Permissions

Before any query executes, Powersheet checks that the current user has read permission for the entity type being queried. Entity types can have permission annotations that restrict access. See Permissions for details.

Document-Scoped Queries

When a currentDocConstraint parameter is provided, the query processor restricts results to work items within a specific document. The constraint can reference either an entity type name or a navigation property path. Combined with polarionType, this enables document-scoped views over specific work item types.

Mapping Validation Rules

These are the most frequent type mapping errors encountered during initial setup:

RTM Mapping Example

Standard RTM entity types with their Polarion type mappings:

Cardinality Impact on Column Binding

The polarionType mapping interacts with relationship cardinality to determine how columns display data. The cardinality of the relationship between entity types determines the expand pattern and column binding syntax used in sheet configurations.

Many-to-One Example

Each UserNeed belongs to one Chapter. The direct navigation property chapter is scalar:
  • chapter renders as a single-value reference picker
  • chapter.title displays the referenced entity’s title as read-only

Many-to-Many Example

UserNeed links to multiple SystemRequirement entities. The back navigation property uses a two-level expand:
  • Many-to-many relationships use an association entity between the two types
  • Source expand is two levels: systemRequirements (association) then systemRequirement (target)
  • Column binding uses dot notation: systemRequirements.systemRequirement
  • The createNew: true option enables inline creation of new linked work items

Complete YAML Example


Related pages: Data Model Types | Properties | Relationships | Cardinality | Link Roles | Constraints
Last modified on July 10, 2026