-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Create object behaviour change from 2.2.17 to 2.2.18 #2570
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
Having the same issue on |
Indeed. Having to use 2.2.17 currently. |
That's odd indeed. it wasn't supposed to be affected. |
I'll have a looks tonight and try to provide a patch ASAP |
Issue originates from: e4c2e65#diff-3646535e0655c134862bb00401c8097cR942 Fix don't seem trivial |
* test case to check beforeSave changes clobbers fetched pointer fields 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. * propogate only changed fields to response. 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. * The goal of this comparision seems to be checking that the all returns the user correctly. Also it is consistent with the hosted parse that user.username not returned from PUT request.
@btanev alright, went back a bit, checking here: http://parseplatform.github.io/docs/rest/guide/#creating-objects the REST call should only return createdAt and objectId, as well as keys that have been set by Cloud Code hooks. The behaviour < 2.2.18 was 'broken'. |
Hi @flovilmart If it is by spec then it is by spec. Thanks for checking this out. Do you guys have in your backlog items that are going to change this behaviour? Can I suggest a change in the behaviour of |
@btanev We should not change that behaviour in the future, there still maybe some quirks that don't match with the original documentation, so when in doubt, I ever go back to the original documentation. As it's stated, it should only return changed fields as well as createdAt and objectId on POST, updatedAt on PUT. If it isn't we should make sure that it the case, I believe there is a test that covers it (https://github.com/ParsePlatform/parse-server/blob/master/spec/ParseAPI.spec.js#L819) |
@btanev, i'm closing that one as the behavior is what's expected from the documentation |
Please read the following instructions carefully.
Check out #1271 for an ideal bug report.
The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!
Many members of the community use Stack Overflow and Server Fault to ask questions.
Read through the existing questions or ask your own!
For database migration help, please file a bug report at https://parse.com/help#report
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!
Issue Description
After updating to parse-server 2.2.18 I've notice a behaviour change when creating an Object using the REST API. In the 2.2.18 the response is missing the additional object fields and contains only the common fields like
objectId
,createdAt
,ACL
Steps to reproduce
Common setup
We have one class defined in the schema e.g.
Author
that have only one fielddisplayName
.Using
parse-server
2.2.17Using
parse-server
2.2.18As you can see the fields
displayName
andupdatedAt
are missing from the response.Question
Is this an expected behaviour? I haven't read about this change in the changelog from 2.2.17 to 2.2.18
We've found this problem after upgrading to 2.2.18 and executing our integration tests.
The text was updated successfully, but these errors were encountered: