emberjs / data

A lightweight reactive data library for web applications. Designed over composable primitives.
https://api.emberjs.com/ember-data/release
Other
3.03k stars 1.33k forks source link

rollback() makes belongsTo and hasMany relations null #1824

Closed quaertym closed 9 years ago

quaertym commented 10 years ago

After rollback() is called on an already saved model, belongsTo and hasMany relations become null in the model. This change is temporary, it is not persisted in the store, the relations are loaded correctly after refresh.

stefanpenner commented 10 years ago

ya this is an issue now. Can you provide a failing test as it would make it a quicker start for someone planning to tackle it.

igorT commented 10 years ago

Should be fixed by SSOT, but I am happy to merge a failing test into the branch to make sure.

stefanpenner commented 10 years ago

@igorT ya, the fix makes more sense via SSOT then doing it adhoc for now.

quaertym commented 10 years ago

@igorT I have a fix but it might not be the best solution. I'll just write the test for now.

quaertym commented 10 years ago

@igorT test is ready

igorT commented 10 years ago

Thanks for the test, I'll apply it to the SSOT branch before merging

quaertym commented 10 years ago

@igorT should I rebase?

igorT commented 10 years ago

Thanks so much for the test. Sorry for not merging it sooner my bad :( I added a bunch of rollback tests for all possible combinations on #2262 instead