Skip to main content
See also: Domain Model Types | Properties | Polarion Type Mapping

Metadata Generation Flow

diagram

Entity Type Metadata

Each entity type in the domain model generates a metadata structure with the following information:
ComponentDescription
Entity type nameThe unique identifier from domainModelTypes keys
Polarion prototypeThe underlying Polarion object type (e.g., work item)
Polarion typeThe specific work item type ID(s) mapped via polarionType
Data propertiesScalar field definitions with type, default, and security
Navigation propertiesRelationship traversal definitions with target types
Primary keyThe objectId property, automatically added to all entity types

Built-in Properties

All entity types automatically receive these built-in data properties:
PropertyTypeDescription
objectIdstringUnique primary key identifier. Part of entity key. Non-nullable, read-only.
idstringPolarion work item ID. Automatically added to all work item entity types.
titlestringWork item title. Automatically added to all work item entity types.
projectIdstringForeign key to the containing project. Automatically added to all work item entity types.

Polarion Type Annotations

Each entity type carries Polarion-specific annotations:
AnnotationDescription
Polarion prototypeIdentifies the Polarion object prototype (e.g., IWorkItem). Default for most entities.
Polarion type IDThe work item type ID from polarionType configuration. Defaults to entity type name with lowercase first letter.
When polarionType is not specified in the domain model, the entity type name is used with its first letter lowercased as the Polarion type ID. For example, entity SystemRequirement defaults to Polarion type systemRequirement.

Primitive Type Mapping

Property types from Polarion custom fields are automatically mapped to their metadata equivalents:
Polarion TypeMetadata TypeNotes
StringStringText values
IntegerInt32Whole numbers
FloatDoubleFloating-point numbers
CurrencyDoubleCurrency values stored as doubles
BooleanBooleanTrue/false values
DateOnlyDateTimeDate without time component
DateDateTimeFull date and time
TimeOnlyDateTimeTime without date component
DurationTimeStringDuration stored as string
TextStringRich text or multiline text
See Primitive Types and Type Conversion for details.

Enum Properties

Enum-typed properties include additional metadata for option loading:
MetadataDescription
Enumeration IDIdentifier of the Polarion enumeration definition
Full qualified enum IDDot-separated identifier combining query keys and entity metadata for unique option lookup
Query keysContext keys (prototype, project, Polarion type, enum ID) used to filter available enum options
Enum default values are resolved in this order:
  1. Explicit default value in domain model configuration
  2. Default from Polarion enumeration definition
  3. null (no default)

Security Annotations

Each property carries security metadata derived from the domain model:
AnnotationDescription
readableWhether the property can be read. Default: true. See Permissions.
updatableWhether the property can be modified. Default: true. See Permissions.
Security permissions are intersected with entity-level permissions, meaning a property cannot be more permissive than its parent entity type.

Domain Model Container

The top-level domain model provides access to all entity types and relationships:
PropertyTypeDescription
domainModelTypesmapMap of all entity type definitions keyed by type name.
relationshipsarrayList of all relationship definitions between entity types.
$versionstringVersion number of the domain model schema for compatibility checking.

Save Operations and Entity States

When saving changes, the metadata system processes entities in one of three states:
Entity StateDescription
AddedNewly created entity. Server generates objectId for client-server key mapping.
ModifiedExisting entity with changed properties. Original values tracked for change detection.
DeletedEntity marked for deletion.
Save operations require the autoGeneratedKeyPropertyName (typically objectId) and use server-side key generation. Verify the exact save behavior for your entity types.

Complete YAML Example

domainModelTypes:
  Document:
    properties:
      title:
      type:

  Chapter:

  UserNeed:
    polarionType: userNeed
    properties:
      title:
      description:
      severity:
      component:

  SystemRequirement:
    polarionType: systemRequirement
    properties:
      title:
      description:
      severity:
      component:

  DesignRequirement:
    polarionType: designOutput
    properties:
      title:
      description:

relationships:
  - from: UserNeed
    to: SystemRequirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: refines
    direct:
      name: systemRequirements
    back:
      name: userNeeds

  - from: SystemRequirement
    to: DesignRequirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: refines
    direct:
      name: designRequirements
    back:
      name: systemRequirements

Related pages: Domain Model Types | Properties | Polarion Type Mapping | Permissions | Field Types Reference
KB ArticlesSource Code
  • SaveTest.java
  • DomainModelV2.java
  • QueryExecutorTest.java
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/constraints_currentDocument_downstream.template.yaml
  • MetadataTest.java