Skip to content

Remove records from record arrays only in deleted.saved state - #33

Closed
drogus wants to merge 1 commit into
emberjs:masterfrom
drogus:ember-data-deleted-records-disappear-from-record-arrays
Closed

drogus wants to merge 1 commit into
emberjs:masterfrom
drogus:ember-data-deleted-records-disappear-from-record-arrays

Conversation

@drogus

@drogus drogus commented Feb 13, 2015

Copy link
Copy Markdown

@alexspeller

Copy link
Copy Markdown
Contributor

👍 this is something I've hit before, it makes much more sense this way around

@mmun mmun added the T-ember-data RFCs that impact the ember-data library label Feb 23, 2015
@drogus

drogus commented Mar 9, 2015

Copy link
Copy Markdown
Author

I've talked about this with @igorT and it can be implemented now thanks to payload snapshots. Previously it could cause unexpected behaviour with relationships. Given post that has many comments, when a comment was deleted, but not persisted, keeping it in record arrays could result in sending the comment when a save was triggered on a post.

I'm not sure if this needs to be merged, because this is about Ember Data, not Ember.js itself.

@runspired

Copy link
Copy Markdown
Contributor

We now hide record from record arrays with a bit more clarity and it covers all the needs and desires expressed in this RFC: https://github.com/emberjs/data/blob/master/addon/-legacy-private/system/model/internal-model.js#L278-L293

Thank you so much for the time and the suggestion 🎉

@runspired runspired closed this Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Champion T-ember-data RFCs that impact the ember-data library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants