-
-
Notifications
You must be signed in to change notification settings - Fork 595
after select query object overide #371
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
Comments
This is how the SDK works by default. All objects pointing to the same server data are backed by the same data. If you have one ParseObject with the id 'abc', and another ParseObject with the id 'abc', saving changes to one will be reflected in both.
This is because objects should represent the last known state of truth from the server. If we know for a fact that a new value was saved to the server, we can safely update the other objects backed by that. This is designed for client side applications, since they usually want to not need to implement logic to keep every part of the UI in sync. If you really want to have objects be completely separate, you can fun the following when your program begins:
|
Thanks for response @andrewimm |
@andrewimm I'm surprised that this is not considered a bug. When a query is issued with a This behavior can also force a client to retrieve much more information than necessary in some situations, just to make sure that the object remains consistent for use elsewhere. Ideally, for a query with a I've tested out a change to |
@dstarke you're right, what you describe should be the correct behavior, I may have misunderstood the full context of the original question. I'd welcome a PR to handle this. |
@andrewimm I added the PR. It ended up being a little more complicated than my earlier test. The complication comes almost entirely from handling select fields that reference sub-objects using dot notation. |
Hi Parse Team,
I am facing problem with parse open source js sdk 1.9.2 .when i apply find query without select.i got full object from parse. after that i make query on same class with select and specified key server return selected object with specified key. but my previous data/object override.
can you any tell me this is open issue with parse open source js sdk.
The text was updated successfully, but these errors were encountered: