Cardinality Property
| Name | Type | Default | Description |
|---|---|---|---|
cardinality | string | None (required) | Defines the relationship multiplicity between the from and to entity types |
Supported Cardinality Values
| Value | From Side | To Side | Description |
|---|---|---|---|
one-to-one | Single entity | Single entity | Each source entity links to exactly one target entity |
one-to-many | Single entity | Multiple entities | Each source entity links to multiple target entities |
many-to-one | Multiple entities | Single entity | Multiple source entities link to one target entity |
many-to-many | Multiple entities | Multiple entities | Multiple source entities link to multiple target entities |
Where Cardinality is Used
Cardinality appears in two locations within the domain model YAML:In the relationships Array
In Inline Navigation Properties
Cardinality and Sheet Configuration
The cardinality value directly affects how columns display data in the sheet configuration:| Cardinality | Column Behavior | Sheet Config Requirement |
|---|---|---|
one-to-one | Single value cell | No special configuration |
one-to-many | Expansion path with child rows | Column key uses dot-separated path |
many-to-one | Reference picker (single select) | display property recommended |
many-to-many | Multi-item column | multiItem: true required on column |
Example: many-to-many in Sheet Configuration
Complete YAML Example
Related Pages
- Relationships — Relationship definition reference
- Storage — Storage mechanisms
- Link Roles — Link role configuration
- Multi-Item Columns — Configuring multi-item columns
- Binding Syntax — Column binding paths
Sources
Sources
Source Code
DatabridgeConstants.javatodosBig_model.yamlprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/constraints_create_only.yamlRelationship.javasf_model.yaml