Skip to content

Fix MongoStorageAdapter.findOneAndUpdate to return Parse Object (#3053) #3064

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

Merged

Conversation

glentregoning
Copy link
Contributor

@glentregoning glentregoning commented Nov 17, 2016

This PR resolves the general issue that the response to PUT request to update an object returns the result formatted as a Mongo DB object rather than a parse object. This results for example as dates objects being serialized as strings instead of objects with appropriate keys e.g.{"__type":"Date","iso":"2016-11-14T07:37:49.838Z"}.

Prior to this fix, responses to an update corrupts the local version of an object on the iOS Parse client (and possibly others).

This also generalizes to responses with objects nested in arrays such as recorded in #3053.

@facebook-github-bot
Copy link

@glentregoning updated the pull request - view changes

@facebook-github-bot
Copy link

@glentregoning updated the pull request - view changes

@facebook-github-bot
Copy link

@glentregoning updated the pull request - view changes

@glentregoning glentregoning changed the title MongoStorageAdapter.findOneAndUpdate returns Parse Object (#3053) Fix MongoStorageAdapter.findOneAndUpdate to return Parse Object (#3053) Nov 17, 2016
@glentregoning
Copy link
Contributor Author

glentregoning commented Nov 17, 2016

FYI I've tried to reproduce the failing test locally but am unable to. Any tips to reproduce / understand this? Or is this an unreliable test in general?

Curiously the build before I merged in master passed successfully: https://travis-ci.org/ParsePlatform/parse-server/builds/176598933

@glentregoning
Copy link
Contributor Author

Looks like it's green now.

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