Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1.15 KB

UPGRADE.md

File metadata and controls

38 lines (30 loc) · 1.15 KB

Upgrade Guides

Ember Data 2.0

Changes required by migration from ED < 2.0 to ED >= 2.0:

If the relationship was... The relationship now must be...
{async: false} no change
{async: true} no change or specification could be removed
not specified {async: false} explicitely

Then the following changes are required by migration from ELA 2.0 to ELA 2.1:

If the relationship was... And the associated records were... The relationship now must be... What about the association getters?
{async: false} embedded no change no change
{async: false} not embedded {async: true}
or not specified
Use promise instead of
direct read
(see example below)
{async: true}
or not specified
not embedded no change no change
{async: true}
or not specified
embedded irrelevant irrelevant

Migration example for affected getters:

var record = model.get('association')
record.get('whatever');
record.doSomething();

Becomes:

model.get('association').then(function(record) {
  record.get('whatever');
  record.doSomething();
})