Property description
The objectRelations asset creates a relation between two objects created by a data package’s objects. Declare it inside the data scope whose objects it connects; a relation whose two endpoints sit in different scopes is declared at asset level (assets.objectRelations) instead. Only valid on packages with "type": "data".
An endpoint may also name an object owned by another data package, written as ownerPackageKey#objectKey. The owner has to be listed in the package’s dependsOn — an undeclared owner fails validation. If the same prefixed key is owned by two packages, validation fails naming both owners, so qualify the reference with the owner you mean.
Like objects, this asset is add-only across package versions: a relation installed by an earlier version is never updated or deleted by an upgrade, even if a newer version no longer declares it.
Minimal JSON
{
"key": "",
"relationTypeKey": "",
"fromObjectKey": "",
"toObjectKey": ""
}{
"key": "db_to_table",
"relationTypeKey": "core#contains",
"fromObjectKey": "customer_db",
"toObjectKey": "customer_table"
}Nested properties
| Property | Description | Values | Mandatory |
|---|---|---|---|
key | Unique key of the asset. Used for referencing in the same package or other packages using packageKey#assetKey. | string | Yes |
relationTypeKey | Key of the relation type. | string | Yes |
fromObjectKey | key of the relation’s source object — either an object declared by this package’s objects, in this version or an earlier one, or ownerPackageKey#objectKey for an object owned by another data package. | string | Yes |
toObjectKey | key of the relation’s target object. Same constraint as fromObjectKey. | string | Yes |