ebryn / ember-model

A lightweight model library for Ember.js
MIT License
524 stars 159 forks source link

Embedded associations remain dirty after saving new record #382

Open danii1 opened 10 years ago

danii1 commented 10 years ago

Setting _dirtyAttributes in didCreateRecord blocks execution of _copyDirtyAttributesToData in didSaveRecord which resets _dirtyAttributes also in hasMany/belongsTo associations. This leads to bugs: after saving newly created record, associations remain dirty while parent object is clean. Fix is simple, just rely on didSaveRecord to do all cleanup.