diff --git a/guides/release/models/relationships.md b/guides/release/models/relationships.md index 8dd64b2644..eea0b4dac3 100644 --- a/guides/release/models/relationships.md +++ b/guides/release/models/relationships.md @@ -466,9 +466,9 @@ It is also possible to remove a record from a `hasMany` relationship: ```javascript let blogPost = this.store.peekRecord('blog-post', 1); -let comment = this.store.peekRecord('comment', 1); +let commentToRemove = this.store.peekRecord('comment', 1); let comments = await blogPost.comments; -comments.removeObject(comment); +blockPost.comments = comments.filter((comment) => comment !== commentToRemove); blogPost.save(); ```