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.

Tip

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

PropertyDescriptionValuesMandatory
keyUnique key of the asset. Used for referencing in the same package or other packages using packageKey#assetKey.stringYes
relationTypeKeyKey of the relation type.stringYes
fromObjectKeykey 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.stringYes
toObjectKeykey of the relation’s target object. Same constraint as fromObjectKey.stringYes