Query Properties
| Name | Type | Default | Description |
|---|---|---|---|
from | string | Required | Root entity type to query. Must match a valid entity type defined in the domain model (e.g., UserNeed, SystemRequirement) |
where | object | None | Filter predicates applied to query results. Supports property comparisons, null checks, and composite AND/OR logic |
expand | array | None | Expand clause specifying navigation properties to load inline. Supports nested expansion for multi-level relationships |
orderBy | array | None | Order by clause with property paths and sort direction (asc/desc) |
select | array | None | Select clause projecting specific properties to return |
parameters | object | None | Runtime query context parameters controlling execution behavior |
Query Execution Flow
- The query
fromclause is resolved against the metadata system to identify the target entity type - Security checks verify the current user has read permission for the entity type
- The
whereclause predicates are split into Lucene-compatible queries and in-memory post-filters (see Query Splitting) - Lucene queries execute against Polarion to fetch matching work items
- In-memory post-filters are applied to refine results
- Navigation properties specified in
expandare loaded for each result entity - Results are sorted per the
orderByclause - The final result set is returned with entity metadata
Query Result Structure
Each entity returned by a query includes standard metadata fields:| Field | Type | Description |
|---|---|---|
$type | string | Entity type name from the metadata system |
entityTypeName | string | Domain model entity type name |
id | string | Polarion work item ID |
title | string | Work item title |
updated | datetime | Last modification timestamp |
project | object | Project foreign key reference |
Query Parameters
Parameters control runtime query behavior. They are passed via theparameters property of the EntityQuery:
| Parameter | Type | Description |
|---|---|---|
revision | string | Execute query against a specific project baseline or revision |
currentDoc | string | Document ID for document filtering. Format: folder/name |
currentDocConstraint | string | Entity type or navigation property path for document scoping |
explain | boolean | Enable debug output showing query translation details |
YAML Configuration Mapping
In the sheet configuration YAML, thesources[].query section maps directly to EntityQuery properties:
| YAML Property | EntityQuery Property | Description |
|---|---|---|
sources[].query.from | from | Root entity type |
sources[].query.where | where | Filter predicate (Lucene syntax or structured) |
sources[].query.orderBy | orderBy | Sort specification |
sources[].expand | expand | Navigation property expansion paths |
sources[].constraints | parameters | Converted to query parameters at runtime |
sources[].model | Metadata resolution | Maps entity types to domain model definitions |
The
<WHERE> placeholder in YAML is replaced at runtime with the user’s current filter state from the toolbar.Querying by ID
To query a specific entity by its Polarion work item ID:Null Checks
To filter entities where a property is or is not null:"eq": null) finds entities where the property has no value. The null inequality check ("ne": null) finds entities where the property has a value.
Relationship Expansion Patterns
Many-to-One
Expand a single parent entity from a child:One-to-Many (Inverse)
Expand a collection of children from a parent:Many-to-Many
Expand through an association entity using two-level dot notation:requirements) navigates to the association entities. The second segment (requirement) navigates through to the target entity.
Many-to-many expansions are bidirectional.
Story -> requirements.requirement and Requirement -> stories.story both traverse the same association.Complete YAML Example
Related Pages
- Predicates — filter condition syntax
- Operators — comparison and logical operators
- Expand Clause — expansion path reference
- Order By Clause — sort specification
- Select Clause — field projection
- Query Context — runtime parameters
- Sources — YAML source configuration
Sources: Code: QueryDataTest.java, PolarionQueryProcessor.java, QueryProcessor.java, QueryManager.tsx, constraints_currentDocument_downstream.template.yaml
Sources
Sources
Source Code
QueryDataTest.javaprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/constraints_currentDocument_downstream.template.yamlpowersheet.yamlprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/whole_rtm.template.yamlQueryProcessor.java