Skip to content

Re-save installation is allowed if LDS is enabled #605

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

Closed
hermanliang opened this issue Mar 16, 2017 · 2 comments
Closed

Re-save installation is allowed if LDS is enabled #605

hermanliang opened this issue Mar 16, 2017 · 2 comments

Comments

@hermanliang
Copy link
Contributor

hermanliang commented Mar 16, 2017

Following PR #579
The installation data will attempt to resave if installation is removed on the server.
But the resaving is not allowed when the local datastore is enabled due to objectID is unchangeable in offline store.
But I think in this case should be allowed .

  1. The setObjectId(id) seems only updating the in-memory map (call sequences: 1 -> 2 -> 3). Maybe just unregister old object from the map when setObjectId(null) and allowing ParseInstalltion type only.
  2. The ParseInstallation offline store (database) will be updated after resaving (call sequences: 1 -> 2 -> 3). The code seems okay does not need to be changed.

Plz correct me if I'm wrong. 😄

@hermanliang hermanliang changed the title Allowing ParseInstallation.setObjectId(null) when the local datastore is enabled Re-save installation is allowed if LDS is enabled Mar 23, 2017
@rogerhu
Copy link
Contributor

rogerhu commented Mar 25, 2017

Sounds ok but is it possible to make this consistent on iOS?

@hermanliang
Copy link
Contributor Author

I think it is possible. I'll submit a PR to make this consistent on iOS. 😄

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

2 participants