« All deprecation guides

Deprecation Guide for Deprecate Array Like

until: 5.0
id: ember-data:deprecate-array-like

Deprecates Ember "Array-like" methods on RecordArray and ManyArray.

These are the arrays returned respectively by store.peekAll(), store.findAll() and hasMany relationships on instance of Model or record.hasMany('relationshipName').value().

The appropriate refactor is to treat these arrays as native arrays and to use native array methods.

For instance, instead of:

users.firstObject;

Use:

users[0];
// or
users.at(0);