Skip to content

Commit

Permalink
fix: update get started with modelling on direct relationship type re…
Browse files Browse the repository at this point in the history
…striction (#520)

Co-authored-by: Raghd Hamzeh <raghd.hamzeh@auth0.com>
  • Loading branch information
adriantam and rhamzeh authored Oct 3, 2023
1 parent 615ead7 commit 8e80849
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/content/modeling/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,8 @@ Why? This relation definition states that:
- `{ user: "folder:{id}", relation: "parent", object: "document:{id}" }`
- `{ user: "drive:{id}", relation: "parent", object: "document:{id}" }`

:::caution Important
In the current <ProductName format={ProductNameFormat.ShortForm}/> version, there is no way to state that a document's parent is either a drive or folder. The application must enforce this.
:::

We can use [direct type restriction](../configuration-language.mdx#the-direct-relationship-type-restrictions) to ensure a document's parent can only be an object of type either drive or folder.

:::note Side note
You might have noticed that the "user" in the tuple is an object. This is a special syntax <ProductName format={ProductNameFormat.ShortForm}/> accepts in the "user" parameter to write [object to object relationships](./building-blocks/object-to-object-relationships.mdx). You can read more about writing data to manage object to object relationships in [Managing Relationships Between Objects](../interacting/managing-relationships-between-objects.mdx).
Expand Down

0 comments on commit 8e80849

Please sign in to comment.