Skip to content

Commit

Permalink
Add note to One-to-many relationship (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname authored Mar 12, 2024
1 parent 8f1757c commit 730418b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/build/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ type Account @entity {
}
```
::: warning Note
`@derrivedFrom` is required and cannot be the `id` field, without this there is no constraint that `Account` is only associated to one person. This would then make it a many-to-many relationship, please follow the many-to-many steps below.
:::
### Many-to-Many relationships
A many-to-many relationship can be achieved by implementing a mapping entity to connect the other two entities.
Expand Down

0 comments on commit 730418b

Please sign in to comment.