Skip to main content
diagram
This model reference is derived from source code fixtures. Property names and defaults should be verified against your Powersheet installation.

Entity Types

The Todos model defines entity types under domainModelTypes. Two format variants exist: object-map and array format.

Object-Map Format (todos_model.yaml)

PropertyTypeDefaultDescription
domainModelTypesarrayNoneDefines all entity types in the domain model.
domainModelTypes[].namestringNoneUnique identifier for the entity type. Used in queries and relationships.
domainModelTypes[].polarionTypestringNoneMaps to a Polarion work item type. If omitted, uses the domain model name.
domainModelTypes[].propertiesarray[]Properties available on this entity type. Each maps to a Polarion field.
domainModelTypes[].properties[].namestringNoneField name mapping to a Polarion work item custom field or built-in field.

Extended Format (todosBig_model.yaml)

The extended format adds inline navigation properties directly on entity types.
PropertyTypeDefaultDescription
domainModelTypes[].properties[].tostringNone (data field)Target entity type for a navigation property. Creates a relationship to another entity.
domainModelTypes[].properties[].cardinalitystringNoneRelationship multiplicity for navigation properties (e.g., one-to-many, many-to-one).

Relationships

Both Todos model variants define explicit bidirectional relationships with navigation properties.
PropertyTypeDefaultDescription
relationshipsarray[]Defines navigation relationships between entity types.
relationships[].fromstringNoneSource entity type. Must match a domainModelTypes[].name.
relationships[].tostringNoneTarget entity type. Must match a domainModelTypes[].name.
relationships[].cardinalitystringNoneRelationship multiplicity between entities.
relationships[].storagestringNonePolarion persistence mechanism (e.g., linkedWorkItems).
relationships[].linkRolestringNonePolarion link role ID for storing the relationship.
relationships[].fromNavPropNamestringNoneNavigation property added to the source entity.
relationships[].toNavPropNamestringNoneNavigation property added to the target entity for bidirectional traversal.

Example Entity Definitions

Simple Format

domainModelTypes:
  - name: TodoItem
    polarionType: todoItem
    properties:
      - name: description
      - name: priority
      - name: status

  - name: Task
    polarionType: task
    properties:
      - name: description
      - name: assignee

  - name: Requirement
    polarionType: requirement
    properties:
      - name: description
      - name: severity

Extended Format with Inline Navigation

domainModelTypes:
  - name: TodoItem
    polarionType: todoItem
    properties:
      - name: description
      - name: priority
      - name: tasks
        to: Task
        cardinality: one-to-many

  - name: Task
    properties:
      - name: description
      - name: requirements
        to: Requirement
        cardinality: one-to-many
When polarionType is omitted, the domain type name is used as the Polarion work item type. This works when your Polarion type IDs match the entity type names exactly.

Example Relationships

relationships:
  - from: TodoItem
    to: Task
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: relates_to
    fromNavPropName: tasks
    toNavPropName: todoItems

  - from: Task
    to: Requirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: relates_to
    fromNavPropName: requirements
    toNavPropName: tasks

Complete YAML Example

domainModelTypes:
  - name: TodoItem
    polarionType: todoItem
    properties:
      - name: description
      - name: priority
      - name: status

  - name: Task
    polarionType: task
    properties:
      - name: description
      - name: assignee

  - name: Requirement
    polarionType: requirement
    properties:
      - name: description
      - name: severity

relationships:
  - from: TodoItem
    to: Task
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: relates_to
    fromNavPropName: tasks
    toNavPropName: todoItems

  - from: Task
    to: Requirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: relates_to
    fromNavPropName: requirements
    toNavPropName: tasks

See Also

Code: todos_model.yaml, todosBig_model.yaml
Source Code
  • todosBig_model.yaml
  • todos_model.yaml
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/constraints_model.template.yaml
  • powersheet.yaml
  • SaveTest.java