#

API Docs for: v3.16.0-alpha.2
Show: Inherited Protected Private Deprecated

# RecordArray Class

Uses

- Ember.Evented

Extends ArrayProxy
Defined in: `../store/addon/-private/system/record-arrays/record-array.js:13`
Module: @ember-data/store

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.

- Index
- Methods
- Properties

## Item Index

### Methods

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

### Properties

- content
- isLoaded
- isUpdating
- store
- type

## Methods

### `_pushInternalModels`

(

- `internalModel`

)
private

Defined in `../store/addon/-private/system/record-arrays/record-array.js:166`

Adds an internal model to the `RecordArray` without duplicates

#### Parameters:

- `internalModel` InternalModel

### `_unregisterFromManager`

() private

Defined in `../store/addon/-private/system/record-arrays/record-array.js:228`

### `objectAtContent`

(

- `index`

)
Model private

Defined in `../store/addon/-private/system/record-arrays/record-array.js:106`

Retrieves an object from the content by index.

#### Parameters:

- `index` Number

#### Returns:

Model:

record

### `removeInternalModel`

(

- `internalModel`

)
private

Defined in `../store/addon/-private/system/record-arrays/record-array.js:180`

Removes an internalModel to the `RecordArray`.

#### Parameters:

- `internalModel` InternalModel

### `save`

() PromiseArray

Defined in `../store/addon/-private/system/record-arrays/record-array.js:191`

Saves all of the records in the `RecordArray`.

Example

    var messages = store.peekAll('message');
    messages.forEach(function(message) {
      message.set('hasBeenSeen', true);
    });
    messages.save();

#### Returns:

PromiseArray:

promise

### `update`

()

Defined in `../store/addon/-private/system/record-arrays/record-array.js:119`

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().then(function() {
      people.get('isUpdating'); // false
    });

    people.get('isUpdating'); // true

## Properties

### `content`

Ember.Array private

Defined in `../store/addon/-private/system/record-arrays/record-array.js:33`

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

Defined in `../store/addon/-private/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`

Boolean

Defined in `../store/addon/-private/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

### `store`

Store private

Defined in `../store/addon/-private/system/record-arrays/record-array.js:76`

The store that created this record array.

### `type`

Model

Defined in `../store/addon/-private/system/record-arrays/record-array.js:93`

The modelClass represented by this record array.