-
-
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
Interpolate objectId and Pointer (as on parse.com) #3711
Comments
@flovilmart - Do you know if the request JSON is still correct? Maybe the keys have changed? |
We haven't changed the API. |
Can you point me in a direction to investigate further- I stepped through the code, but there was nothing obvious.
|
What SDK are you using?
|
I'm using the PHP SDK for the main application. |
I've checked the JS SDK - same thing occurs. |
Is season a pointer? |
It is yes. |
More context:
Returns an object:
Returns an empty array. |
Correctly returns the data - so I assume, something has happened to |
Alright, I believe I know what's going on. I'll have a look |
@flovilmart - Anything I can try to help with? I'm on a short timescale and getting pressure from a client. If you can point me in the direction, I maybe able to create a patch. Thanks - appreciate your efforts, keeping parse update. |
Basically, I believe the issue is that when you use matchesKeyInQuery, it will try to match the objectId instead of the full pointer. |
To get started, can you open a PR with the failing test? |
I'll get on it - |
Awesome! Once the test is written, it's gonna be pretty easy to find the underlying issue :) |
@flovilmart - Test complete, where should I look next, my friend? |
Probably in RestQuery.js but let me check a few things first about your usage of the API, probably something's amiss. |
I may have written the test wrong, but switched the keys around just in case: |
Just checked the PHP code - it seems the keys are supposed to be the other way around so - I've updated the JS test. Sorry about that - |
Curious: Looks like it passes using Postgres: https://travis-ci.org/parse-community/parse-server/builds/226664092 |
@flovilmart - I'm desperate for a solution as the season starts on Saturday and really need the system to work identically to last year. So - I've been digging around
|
I'll work on a fix, I have a pretty good idea of what's going on. |
You would be a life saver - |
Did you try to use |
I would lead with that next time. ahaha 😞 - Good to know. What's the best course of action:
|
None of those, this depends on your data structure, any of each could be valid. Not sure how it was working on Parse.com, if because the target field "season" is a pointer, the objectId's are transformed to a pointer matching. This is not that the server doesn't allow key=='objectId', this is a valid query when you do:
Where you seasonObjectId column is effectively a string, which is the objectId of a season object. |
I see - that makes sense - so there are cases when people just save the ID instead of using a pointer. - Well, now i'm educated. Maybe FB had a fallback in case it returned no results, try a string value match first, then pointer if that failed. |
Like I said we could convert those to pointers if the target field is a pointer, did it work before? |
It absolutely 100% worked before.
|
I'm looking for a fix now |
TBH' I still would recommend you to change your code, as I can't guarantee when the fix will be released. |
@flovilmart - Way ahead of you :) - Thanks so much for your direction, in more ways than one, without you parse would likely fall apart. |
Thanks for the kind words, but many other contributors make it work, and without them, I would fall apart. |
@awgeorge I changed the nature of the issue as it's not a blocker for the moment, but more a nice to have. Is that fine by you? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The label |
Issue Description
Like: #1014, matchesKeyInQuery returns an empty set.
The ACL is set correctly, and can query both records separately.
Steps to reproduce
Expected Results
The results should be returned
Actual Outcome
An empty set is returned
Environment Setup
Server
Database
Logs/Trace
Related
#1014
#3678 ?
The text was updated successfully, but these errors were encountered: