Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion docs/content/upsert-items.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,33 @@ Example of property deletion:
}
]
}
```
```

## Relationship Property Format

When creating or updating relationship properties, you must provide the explicit
ID of the related item in the `data_value` field. This is different from other
property types that use a direct value.

Example of a relationship property:
```typescript
{
"data": [
{
"id": "stockholm",
"class_id": "City",
"properties": [
{
"id": "country",
"statements": [
{ "data_value": { "id": "sweden" } } // Reference to the sweden item
]
}
]
}
]
}
```

> **Note:** If the referenced item doesn't exist in the database, a foreign key
violation error will be raised.