diff --git a/README.MD b/README.MD index 5c4a5cf9..06900cf7 100644 --- a/README.MD +++ b/README.MD @@ -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) => console.log(posts.getModels()) ); @@ -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: