ember-changeset icon indicating copy to clipboard operation
ember-changeset copied to clipboard

Intended "Getter" Behavior When Used with Ember-Data Model ?

Open kdagnan opened this issue 2 years ago • 0 comments

Hi,

I have 2 applications, old and new.

Old:

  • Running Ember 3.20.2, Ember-Data 3.20.x, and Ember-Changeset 2.2.4
  • Ember-Data models are still defined with 'classic' syntax (ie. Model.extend and computed properties)

New:

  • Running ember 3.28.x, ember-data 3.28.x and Ember-Changeset 4.1.x
  • Ember-Data models are defined in 'octane' syntax (ie. class Example extends Model and get property() )

When I create a changeset from the respective ember-data models, is the below behavior expected?

Old: changeset.get('computedProperty') is always valid based on changeset.get('dependency') value New: changeset.getterProperty is not updated when changeset.dependency is updated, only when changeset.save() persists the changes to the ember-data model

Is this because I'm not using .get() and .set() in new?

kdagnan avatar Mar 01 '23 23:03 kdagnan