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

Entire model is needed prior to deletion #70

Closed
willwhite opened this issue Dec 27, 2012 · 0 comments
Closed

Entire model is needed prior to deletion #70

willwhite opened this issue Dec 27, 2012 · 0 comments

Comments

@willwhite
Copy link
Contributor

In backbone, it's possible to provide an isNew() function that relies on attributes other than the default id. This poses a problem for deletion in the Route server as destroy() checks to make sure a model isn't new before proceeding. If any key attributes used by a custom isNew() function are missing, the destroy will be aborted.

The most straight-forward remedy would be to ensure that all model attributes are available before destroy() is called. It's currently unclear to me whether it's safe to use the req.body provided by the client or if the server should call fetch.

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

1 participant