Entire model is needed prior to deletion #70

willwhite opened this Issue Dec 27, 2012 · 0 comments


None yet
1 participant

willwhite commented Dec 27, 2012

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