Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We do not destroy records that have been unloaded #2862

Closed
igorT opened this issue Mar 12, 2015 · 6 comments
Closed

We do not destroy records that have been unloaded #2862

igorT opened this issue Mar 12, 2015 · 6 comments

Comments

@igorT
Copy link
Member

igorT commented Mar 12, 2015

We probably should?

@bmac
Copy link
Member

bmac commented Mar 12, 2015

Sounds like the correct move. It also looks like we don't remove the unloaded record from the store unless we are calling store.unloadAll. Is that something we should be doing?

@aaronbhansen
Copy link

As far as I have seen, if you delete a record, but don't destroy it, when you need to save that delete later there isn't an easy way to get all records that have been deleted in ember and save the deletes to the server. The only easy way is to keep a reference of the deleted models somewhere. In our app, we try to save everything at once before the page transition, and this is one issue we have. Seems like it's related to this ticket. It would be great if there was a way to specifically get deleted records, or on a has many save, save the deleted records first.

@drogus
Copy link
Contributor

drogus commented Mar 13, 2015

@aaronbhansen I think this is not quite that case. This is only talking about unloading records, so when you run record.unloadRecord(). Deleted records should be unloaded as well, but even in this case it will happen only when the change is persisted, ie. when the record goes in deleted.saved state

@aaronbhansen
Copy link

Okay, maybe mine is a separate issue then. It sounded similar but I wasn't sure. I didn't see another issue about saving deleted records at a later point in time, but this sounded close. If this issue if purely about unloading, I can create a separate issue.

@givanse
Copy link

givanse commented Apr 10, 2015

I think that destroying records that have been unloaded would break the workaround that I have for this scenario: #2982 If you can tell me how to push this forward I'll do some more tinkering.

@igorT
Copy link
Member Author

igorT commented Jun 11, 2015

tracking this under #3296

@igorT igorT closed this as completed Jun 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants