Class ManyArray
Extends: | EmberObject |
---|---|
Uses: | DeprecatedEvented , | Ember.MutableArray
Defined in: | ../model/addon/-private/system/many-array.js:14 |
Module: | @ember-data/store |
reload public
Module: | @ember-data/store |
---|
Defined in ../model/addon/-private/system/many-array.js:260
Reloads all of the records in the manyArray. If the manyArray holds a relationship that was originally fetched using a links url Ember Data will revisit the original links url to repopulate the relationship.
If the manyArray holds the result of a store.query()
reload will re-run the original query.
Example
var user = store.peekRecord('user', 1) user.login().then(function() { user.get('permissions').then(function(permissions) { return permissions.reload(); }); });
save PromiseArray
Module: | @ember-data/store |
---|
Defined in ../model/addon/-private/system/many-array.js:288
- returns
- PromiseArray
- promise
Saves all of the records in the ManyArray
.
Example
store.findRecord('inbox', 1).then(function(inbox) { inbox.get('messages').then(function(messages) { messages.forEach(function(message) { message.set('isRead', true); }); messages.save() }); });
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember-data/3.25/classes/ManyArray/methods