home
  • Blog
  • Home
  • Projects
    • Ember
    • EmberData
    • Ember CLI
3.28
  • Packages
    • @ember-data/adapter
    • @ember-data/adapter/error
    • @ember-data/adapter/json-api
    • @ember-data/adapter/rest
    • @ember-data/canary-features
    • @ember-data/debug
    • @ember-data/deprecations
    • @ember-data/model
    • @ember-data/record-data
    • @ember-data/serializer
    • @ember-data/serializer/json
    • @ember-data/serializer/json-api
    • @ember-data/serializer/rest
    • @ember-data/store
  • Classes
    • AbortError
    • Adapter
    • AdapterError
    • AdapterPopulatedRecordArray
    • BelongsToReference
    • BooleanTransform
    • BuildURLMixin
    • ConflictError
    • DateTransform
    • EmbeddedRecordsMixin
    • Errors
    • ForbiddenError
    • HasManyReference
    • IdentifierCache
    • InvalidError
    • JSONAPIAdapter
    • JSONAPISerializer
    • JSONSerializer
    • ManyArray
    • MinimumAdapterInterface
    • MinimumSerializerInterface
    • Model
    • NotFoundError
    • NumberTransform
    • PromiseArray
    • PromiseManyArray
    • PromiseObject
    • RESTAdapter
    • RESTSerializer
    • RecordArray
    • RecordDataDefault
    • RecordDataStoreWrapper
    • RecordReference
    • Reference
    • Serializer
    • ServerError
    • Snapshot
    • SnapshotRecordArray
    • StableRecordIdentifier
    • Store
    • StringTransform
    • TimeoutError
    • Transform
    • UnauthorizedError

Class AdapterPopulatedRecordArray public


Extends: RecordArray
Defined in: ../store/addon/-private/system/record-arrays/adapter-populated-record-array.js:15
Module: @ember-data/store

Represents 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
}


Methods

save : PromiseArray public

Module: @ember-data/store

Inherited from RecordArray ../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

Module: @ember-data/store

Inherited from RecordArray ../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

Module: @ember-data/store

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

Module: @ember-data/store

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

Module: @ember-data/store

Inherited from RecordArray ../store/addon/-private/system/record-arrays/record-array.js:104

The modelClass represented by this record array.

On this page


Methods

  • save
  • update

Properties

  • isLoaded
  • isUpdating
  • type
Team Sponsors Security Legal Branding Community Guidelines
Twitter GitHub Discord Mastodon

If you want help you can contact us by email, open an issue, or get realtime help by joining the Ember Discord.

© Copyright 2025 - Tilde Inc.
Ember.js is free, open source and always will be.


Ember is generously supported by
blue Created with Sketch.