We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 76c870f + 41a4e1c commit 2c70c1aCopy full SHA for 2c70c1a
guides/release/models/relationships.md
@@ -466,9 +466,9 @@ It is also possible to remove a record from a `hasMany` relationship:
466
467
```javascript
468
let blogPost = this.store.peekRecord('blog-post', 1);
469
-let comment = this.store.peekRecord('comment', 1);
+let commentToRemove = this.store.peekRecord('comment', 1);
470
let comments = await blogPost.comments;
471
-comments.removeObject(comment);
+blockPost.comments = comments.filter((comment) => comment !== commentToRemove);
472
blogPost.save();
473
```
474
0 commit comments