Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

PATCH support #52

Open
nilbus opened this issue Sep 26, 2013 · 0 comments
Open

PATCH support #52

nilbus opened this issue Sep 26, 2013 · 0 comments

Comments

@nilbus
Copy link
Owner

nilbus commented Sep 26, 2013

Local attributes for models that are not yet synced can be lost after save(attrs, {patch: true})

A model will have a temporary id when it is recently created and has not yet been successfully synced.

When an un-synced model is updated with patch: true and the server responds with a partial or empty set of attributes, attributes not in the server response will be missing in the local copy. This happens because the unsynced version is discarded, and a new model is created locally. See backbone.dualstorage.coffee:271.

It instead should update the existing local model's attributes with the server response, just as it does for a synced model.
#51 may change the way attributes are updated, so it may be best to wait to fix this until that is resolved.

@nilbus nilbus mentioned this issue Dec 27, 2013
@nilbus nilbus added this to the 2.0 milestone Jul 7, 2014
@nilbus nilbus modified the milestone: 2.0 May 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant