#

API Docs for: v3.8.1
Show: Inherited Protected Private Deprecated

# DS.AdapterPopulatedRecordArray Class

Extends DS.RecordArray
Defined in: `addon/-private/system/record-arrays/adapter-populated-record-array.js:7`
Module: ember-data

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`.

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
    }

- Index
- Methods
- Properties

## Item Index

### Methods

- _pushInternalModels
- _setInternalModels
- _unregisterFromManager
- objectAtContent
- removeInternalModel
- save
- update

### Properties

- content
- isLoaded
- isUpdating
- store
- type

## Methods

### `_pushInternalModels`

(

- `internalModel`

)
private

Inherited from DS.RecordArray: `addon/-private/system/record-arrays/record-array.js:165`

Adds an internal model to the `RecordArray` without duplicates

#### Parameters:

- `internalModel` InternalModel

### `_setInternalModels`

(

- `internalModels`
- `payload`

)
private

Defined in `addon/-private/system/record-arrays/adapter-populated-record-array.js:66`

#### Parameters:

- `internalModels` Array
- `payload` Object

  normalized payload

### `_unregisterFromManager`

() private

Inherited from DS.RecordArray: `addon/-private/system/record-arrays/record-array.js:227`

### `objectAtContent`

(

- `index`

)
DS.Model private

Inherited from DS.RecordArray: `addon/-private/system/record-arrays/record-array.js:105`

Retrieves an object from the content by index.

#### Parameters:

- `index` Number

#### Returns:

DS.Model: record

### `removeInternalModel`

(

- `internalModel`

)
private

Inherited from DS.RecordArray: `addon/-private/system/record-arrays/record-array.js:179`

Removes an internalModel to the `RecordArray`.

#### Parameters:

- `internalModel` InternalModel

### `save`

() DS.PromiseArray

Inherited from DS.RecordArray: `addon/-private/system/record-arrays/record-array.js:190`

Saves all of the records in the `RecordArray`. Example ```javascript var messages = store.peekAll('message'); messages.forEach(function(message) { message.set('hasBeenSeen', true); }); messages.save(); ```

#### Returns:

DS.PromiseArray: promise

### `update`

()

Inherited from DS.RecordArray: `addon/-private/system/record-arrays/record-array.js:118`

Used to get the latest version of all of the records in this array from the adapter. Example ```javascript var people = store.peekAll('person'); people.get('isUpdating'); // false people.update().then(function() { people.get('isUpdating'); // false }); people.get('isUpdating'); // true ```

## Properties

### `content`

Ember.Array private

Inherited from DS.RecordArray: `addon/-private/system/record-arrays/record-array.js:30`

The array of client ids backing the record array. When a record is requested from the record array, the record for the client id at the same index is materialized, if necessary, by the store.

### `isLoaded`

Boolean

Inherited from DS.RecordArray: `addon/-private/system/record-arrays/record-array.js:42`

The flag to signal a `RecordArray` is finished loading data. Example ```javascript var people = store.peekAll('person'); people.get('isLoaded'); // true ```

### `isUpdating`

Boolean

Inherited from DS.RecordArray: `addon/-private/system/record-arrays/record-array.js:56`

The flag to signal a `RecordArray` is currently loading data. Example ```javascript var people = store.peekAll('person'); people.get('isUpdating'); // false people.update(); people.get('isUpdating'); // true ```

### `store`

DS.Store private

Inherited from DS.RecordArray: `addon/-private/system/record-arrays/record-array.js:73`

The store that created this record array.

### `type`

DS.Model

Inherited from DS.RecordArray: `addon/-private/system/record-arrays/record-array.js:92`

The modelClass represented by this record array.