-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Receiving a HTTP 500 when using a distinct query on nullable field #4540
Comments
Good catch! Would you like to open a PR for this issue? |
@flovilmart I have a PR ready for this but I wanted to verify something. I noticed a difference when setting a field from a value to null or undefined. When using null the field is set.
When using undefined the field isn't updated.
Is this proper behavior? This is specific for Mongo, they both update when using PG |
it boils down to bottom values, undefined is not serialized, this is an unset, in PG null or unset is the same right? |
@dplewis Sorry for not answering to your message and thanks for the PR :) |
how do we get a field back to 'undefined' when using unset in js sdk? now it sets it to null which isnt the same and breaks older versions. @flovilmart |
Issue Description
Parse-Server responds with a HTTP 500 when using a
distinct query
on the _User table using a field which is set tonull
on one or more objects.Steps to reproduce
Setup a new parse-server instance and add a field of the type
String
to the table. Create a new user and set the newly created field tonull
for the new user. Use the newdistinct query
feature on that field.Expected Results
The server should return an array with all distinct strings
Actual Outcome
The server responds with a HTTP 500
Environment Setup
Server
Database
Logs/Trace
The text was updated successfully, but these errors were encountered: