Class DS.ManyArray

Ember.MutableArray
Extends: Ember.Object
Uses: Ember.Evented ,
Defined in: addon/-private/system/many-array.js:14
Module: ember-data

reload public

Module: ember-data

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 DS.PromiseArray

Module: ember-data
returns
DS.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/2.18/classes/DS.ManyArray/methods