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
7 changes: 6 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ constructor(private datastore: Datastore) { }

getPosts(){
this.datastore.findAll(Post, {
page: { size: 10, number: 1}
page: { size: 10, number: 1 },
filter: {
title: 'My Post',
},
}).subscribe(
(posts: JsonApiQueryData<Post>) => console.log(posts.getModels())
);
Expand Down Expand Up @@ -338,6 +341,8 @@ this.datastore.findRecord(Post, '1', {

The library will try to resolve relationships on infinite levels connecting nested objects by reference. So that you can have a `Post`, with a list of `Comment`s, that have a `User` that has `Post`s, that have `Comment`s... etc.

**Note**: If you `include` multiple relationships, **do not** use whitespaces in the `include` string (e.g. `comments, comments.user`) as those will be encoded to `%20` and this results in a broken URL.

#### Creating Records

If the object you want to create has a **one-to-many** relationship, you can do this:
Expand Down