Class AdapterPopulatedRecordArray
publicRepresents an ordered list of records whose order and membership is
determined by the adapter. For example, a query sent to the adapter
may trigger a search on the server, whose results would be loaded
into an instance of the AdapterPopulatedRecordArray
.
This class should not be imported and instantiated by consuming applications.
If you want to update the array and get the latest records from the
adapter, you can invoke update()
:
Example
// GET /users?isAdmin=true
store.query('user', { isAdmin: true }).then(function(admins) {
admins.then(function() {
console.log(admins.get("length")); // 42
});
// somewhere later in the app code, when new admins have been created
// in the meantime
//
// GET /users?isAdmin=true
admins.update().then(function() {
admins.get('isUpdating'); // false
console.log(admins.get("length")); // 123
});
admins.get('isUpdating'); // true
}
isLoaded public
Inherited from RecordArray ../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
Inherited from RecordArray ../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
Inherited from RecordArray ../store/addon/-private/system/record-arrays/record-array.js:104
The modelClass represented by this record array.