-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Stale data with Cloud functions and deleted fields #1347
Comments
Analog to #205 and its fix #206, this seems to be caused by the fact that Parse-SDK-JS uses the The The following patch solves this issue for me. However, I have not been able to come up with a meaningful test case. diff --git a/src/decode.js b/src/decode.js
index 42512fb..b29bb8e 100644
--- a/src/decode.js
+++ b/src/decode.js
@@ -34,7 +34,7 @@ export default function decode(value: any): any {
return ParseObject.fromJSON(value);
}
if (value.__type === 'Object' && value.className) {
- return ParseObject.fromJSON(value);
+ return ParseObject.fromJSON(value, true);
}
if (value.__type === 'Relation') {
// The parent and key fields will be populated by the parent |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is there anything missing from the issue description as to get some feedback? |
Could you please open a PR with the solution and a test case which reproduces the issue? |
@aforemny I can take this from here, or do you want to continue? |
@JohannWeging Please do go ahead :-) Thanks! |
@aforemny @JohannWeging Did a PR ever get created for this issue? We ran into this same problem, although our case is for deleted fields being returned from @mtrezza Is there anything I can do to help with this? |
After some more investigation, I'm realizing that our particular issue will likely not be fixed by the proposed fix in The end result is that the network response representing the newly logged-in user is only treated as "changes" to the objectCache, and any previously set fields remain even if they had since been deleted (through the Parse Dashboard, for example). Between the |
I am not aware of any PR that addresses this issue. I think a failing test case to demo the issue would be helpful. If your issue is unrelated to this existing issue, you could open a new issue for discussion. |
New Issue Checklist
Issue Description
Objects returned by Cloud functions may cause the client to return stale data when used with deleted fields.
Steps to reproduce
Item
with optional String-fieldlabel
label: 'foobar'
listItems
that returns the list of items, ie.Actual Outcome
Expected Outcome
Environment
Server
Database
Client
Logs
It is observable that the second response does not include
"label": "foobar"
(or just"label"
) in its response.The text was updated successfully, but these errors were encountered: