After update from Ember 3.26.x to 3.28.11 model.deleteRecord() method does not change model.hasDirtyAttributes

We want to update our application till the latest 4.x version, but first need to update to latest 3.x version and fix all deprecations.

After update Ember from 3.26.x to 3.28.11 and Ember-Data from 3.26.x to 3.28.12, the model.deleteRecord() method does not change model.hasDirtyAttributes to be equal true. I have checked the docs and did not find that logic changed, but it did :face_with_monocle:

We have a huge application and lot of code relies on logic, that deleting a record makes its hasDirtyAttributes property equal to true, instead of it remains false. I should mention that model.isDeleted becomes equal to true after call to model.deleteRecord().

Is it expected behaviour?

I was halfway done typing that this doesn’t seem expected and you should try reproducing in a brand new app and submitting a bug report but I checked Discord and it appears that the Ember Data folk do not agree on expectations here.

You could still submit a bug report with a reproduction and argue that this is a regression but I’m not sure if that will be worth the time.


Hi @dknutsen . Thank you for reply. It explains what happend.

I would agree that @runspired 's explanation makes sense if logic would have been implemented like that from very beginning - no problem, but now it is not just regression, it is API change! It forces us to look through all the code base and add check for model.isDeleted.