Skip to content
Merged
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
10 changes: 0 additions & 10 deletions docs/content/1.guide/3.relationships/1.getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,16 +239,6 @@ useRepo(User).withAllRecursive().get()
useRepo(User).withAllRecursive(2).get()
```

### Loading Nested Relationships

To load nested relationships, you may pass constraints to the 2nd argument. For example, let's load all of the book's authors and all of the author's personal contacts:

```js
const books = useRepo(Book).with('author', (query) => {
query.with('contacts')
}).get()
```

## Inserting Relationships

You may use `save` method to save a record with its nested relationships to the store. When saving new records into the store via `save` method, Pinia ORM automatically normalizes and stores data that contains any nested relationships in it's data structure. For example, let's say you have the `User` model that has a relationship to the `Post` model:
Expand Down