Class DS.RecordArray
A record array is an array that contains records of a certain modelName. The record
array materializes records as needed when they are retrieved for the first
time. You should not create record arrays yourself. Instead, an instance of
DS.RecordArray
or its subclasses will be returned by your application's store
in response to queries.
save DS.PromiseArray
Module:
ember-data
Defined in addon/-private/system/record-arrays/record-array.js:182
- returns
- DS.PromiseArray
promise
Saves all of the records in the RecordArray
.
Example
var messages = store.peekAll('message');
messages.forEach(function(message) {
message.set('hasBeenSeen', true);
});
messages.save();
update
Module:
ember-data
Defined in addon/-private/system/record-arrays/record-array.js:114
Used to get the latest version of all of the records in this array from the adapter.
Example
var people = store.peekAll('person');
people.get('isUpdating'); // false
people.update().then(function() {
people.get('isUpdating'); // false
});
people.get('isUpdating'); // true