-
-
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
Fixes #1271 #1295
Fixes #1271 #1295
Conversation
query.objectId['$in'] = [...new Set(queryIn)]; | ||
|
||
// Need to make sure we don't clobber existing $lt or other constraints on objectId | ||
if (!('objectId' in query) || typeof query.objectId === 'string') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move that up? be tough to follow why it's correct to override when typeof query.objectId === 'string'
as it's a case managed on L493.
Current coverage is
|
// Need to make sure we don't clobber existing $lt or other constraints on objectId | ||
// Need to make sure we don't clobber existing $lt or other constraints on objectId. | ||
// Clobbering $eq, $in and shorthand $eq (query.objectId === 'string') constraints | ||
// is expected though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drew-gross @flovilmart
I ran into an issue migrating an app to Parse Server and I'm hoping you can shed some light on this. You can see the failing test I wrote here. On api.parse.com and Parse Server <= 2.2.4 this test passes.
I tracked the problem down to this comment. Should we really be clobbering $eq constraints here or should the test linked above pass? The hacky feeling workaround would be to replace query.equalTo("objectId", cake1.id)
with query.containedIn("objectId", [cake1.id])
in my test.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JeremyPlease I believe the test should pass as the query construction seem to be valid. Do you have an idea for the fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flovilmart Check out #2472 and let me know what you think.
No description provided.