Class RecordArray public
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
RecordArray
or its subclasses will be returned by your application's store
in response to queries.
This class should not be imported and instantiated by consuming applications.
Methods
save : PromiseArray public
Defined in ../store/addon/-private/system/record-arrays/record-array.js:179
- returns
- PromiseArray
promise
Saves all of the records in the RecordArray
.
Example
let messages = store.peekAll('message');
messages.forEach(function(message) {
message.set('hasBeenSeen', true);
});
messages.save();
update public
Defined in ../store/addon/-private/system/record-arrays/record-array.js:131
Used to get the latest version of all of the records in this array from the adapter.
Example
let people = store.peekAll('person');
people.get('isUpdating'); // false
people.update().then(function() {
people.get('isUpdating'); // false
});
people.get('isUpdating'); // true
Properties
isLoaded public
Defined in ../store/addon/-private/system/record-arrays/record-array.js:54
The flag to signal a RecordArray
is finished loading data.
Example
let people = store.peekAll('person');
people.get('isLoaded'); // true
isUpdating public
Defined in ../store/addon/-private/system/record-arrays/record-array.js:69
The flag to signal a RecordArray
is currently loading data.
Example
let people = store.peekAll('person');
people.get('isUpdating'); // false
people.update();
people.get('isUpdating'); // true
type public
Defined in ../store/addon/-private/system/record-arrays/record-array.js:104
The modelClass represented by this record array.