forked from emberjs/data
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
include
param support for create/update/delete operations
Fixes emberjs#4344 This allows an `include` parameter for be specified when creating, updating, or deleting a model. This feature was originally discussed in emberjs/rfcs#99 but was not part of the initial implementation. Examples: ```javascript // POST /posts?include=author let post = this.store.createRecord('post', { title: 'Hurray' }); post.save({ include: 'author' }); ``` ```javascript // PUT /posts/123?include=comments let post = this.store.peekRecord('post', 123); set(post, 'title', 'Hurray'); post.save({ include: 'comments' }); ``` ```javascript // DEL /posts/123?include=comments let post = this.store.peekRecord('post', 123); post.deleteRecord(); post.save({ include: 'comments' }); ```
- Loading branch information
1 parent
b754321
commit 526a94d
Showing
5 changed files
with
141 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.