-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Non trivial before save pointer clobber #2406
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
Non trivial before save pointer clobber #2406
Conversation
Basically if beforeSave makes any changes to the object it is trying to save, the fetched pointer fields on the client gets clobbered to only pointer.
Earlier we were returning all fields even if any changes happened in beforeSave. This causes the fetched pointer fields on the client to get clobbered to only pointers. This fix returns only the changed fields thus avoiding pointer clobber.
…s the user correctly. Also it is consistent with the hosted parse that user.username not returned from PUT request.
Current coverage is 91.84% (diff: 100%)@@ master #2406 diff @@
==========================================
Files 95 95
Lines 10708 10707 -1
Methods 1309 1310 +1
Messages 0 0
Branches 1741 1740 -1
==========================================
- Hits 9835 9834 -1
Misses 873 873
Partials 0 0
|
The travis failures https://travis-ci.org/ParsePlatform/parse-server/jobs/147683600 when I run it against my repo seems to be passing. So going to re-trigger the ci. |
So every time the timout is happening in different cases. |
@flovilmart Hey, everytime I trigger test, it seems to be timing out on one of the node/mongo version. Any idea how to get this thro? |
LGTM! |
When the beforeSave makes changes to the object being saved, the fetched pointer fields on the client gets clobbered to only pointers.
It is related to #1238
But the beforeSave also makes changes to the object being saved.