Skip to content

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

Conversation

sud80
Copy link
Contributor

@sud80 sud80 commented Jul 27, 2016

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.

sud80 added 3 commits July 27, 2016 12:07
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.
@codecov-io
Copy link

codecov-io commented Jul 27, 2016

Current coverage is 91.84% (diff: 100%)

Merging #2406 into master will decrease coverage by <.01%

@@             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          

Powered by Codecov. Last update 831b29b...78eccce

@sud80
Copy link
Contributor Author

sud80 commented Jul 27, 2016

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.

@sud80 sud80 closed this Jul 27, 2016
@sud80 sud80 reopened this Jul 27, 2016
@sud80 sud80 closed this Jul 27, 2016
@sud80 sud80 reopened this Jul 27, 2016
@sud80
Copy link
Contributor Author

sud80 commented Jul 27, 2016

@sud80 sud80 closed this Jul 27, 2016
@sud80 sud80 reopened this Jul 27, 2016
@sud80 sud80 closed this Jul 28, 2016
@sud80 sud80 reopened this Jul 28, 2016
@sud80
Copy link
Contributor Author

sud80 commented Jul 28, 2016

@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?

@flovilmart
Copy link
Contributor

LGTM!

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

Successfully merging this pull request may close these issues.

3 participants