Class DS.RecordArray
A record array is an array that contains records of a certain type. 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.
Methods
save : DS.PromiseArray
Defined in packages/ember-data/lib/system/record-arrays/record-array.js:151
- 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
Defined in packages/ember-data/lib/system/record-arrays/record-array.js:99
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();
people.get('isUpdating'); // true
Properties
isLoaded
Defined in packages/ember-data/lib/system/record-arrays/record-array.js:45
The flag to signal a RecordArray
is finished loading data.
Example
var people = store.peekAll('person');
people.get('isLoaded'); // true
isUpdating
Defined in packages/ember-data/lib/system/record-arrays/record-array.js:59
The flag to signal a RecordArray
is currently loading data.
Example
var people = store.peekAll('person');
people.get('isUpdating'); // false
people.update();
people.get('isUpdating'); // true
type
Defined in packages/ember-data/lib/system/record-arrays/record-array.js:25
The model type contained by this record array.