-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Query of type "whereKey matchesKey inQuery" returns 'improper usage of $select' error #371
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
This definitely looks like a bug, sorry for the late review... Any chance you can confirm this still occurs with 2.1.3 @haparicio ? |
Just updated and confirmed that it is still happening. If I can provide any further data that may help you, please let me know. |
hi @haparicio is it still occurring with the master branch? |
I was using your parse-server-example to test this, which, from what I saw, already points to the 2.1.3 version of parse-server. I just cloned the parse-server master branch, and ran it as a standalone parse server, pointing to my migrated database. The problem still seems to be happening. I tried the problematic query, which still returns the same error, and I tried a simpler query (without a where clause), just to make sure I get a result, and it worked fine. Again, if I can provide any further information, please let me know. |
hey @haparicio
and it seems to be fine (running master) |
Your code translates into a different query than the one I mentioned in my original post. I tried your query with curl, and it does seem to be working. However, my swift code (that uses the objective-c parse lib) still translates to the query that I mentioned in my original post. That query works with hosted parse, but not with local parse. |
Can you post the swift code? what I shared is just the where clause. |
The query code is the one I mentioned in the original post:
Other than this, I can add the functions that are required by the PFQueryTableViewController:
The function I also have a query that counts some items:
This query runs after the first query I mentioned, and when the problem occurs, I'm almost sure we don't even reach it, so I think it's not relevant. Just posting it here in case I'm wrong. Is there any other code that you think could be relevant? |
so this is working for me, not throwing any error:
|
I'm using a freshly cloned parse-server from the master branch, which is 2.1.3. I also used your parse-server-example which points to the 2.1.3 version. Both have the same result. The fact that your JS code is equivalent to my swift code, and they translate to different queries, seems to indicate that the objective-c library is doing the wrong translation, and the problem is not in the parse-server. But the strange thing is that the same query that returns the I'm not very comfortable with this query language, so I'm not sure if your translation result is supposed to be the same as my translation result, but if it is, I would say the bug (if it's actually a bug) only happens with my translation result. |
what point do you see is different? the where clause look the same |
With just the where clause, my query translates into this:
While yours, from what you said, translates into this:
They're exactly the same except for that Again, I don't know much about this query language, so I'm not sure if that |
Oh alright! Thanks for the troubleshooting! I belive this has an error because parse-server interprets the missing where as an error :) |
Glad to help. :) If I can help anymore, please let me know. |
Just had to remove 1 line :) |
Those are the best fixes. :) |
Hi.
I've been using a query in a iOS app, that worked fine with parse hosted services,
but after trying with a local parse server it returns the error
improper usage of $select error
.For NDA reasons, I had to change the names of the classes, attributes, tokens and keys in this ticket.
This is the query I'm using:
A1 and A2 are pointers to objects of the same type. I tried the same query with simple types,
but the error still happens. If I comment the
whereKey
line, the query works perfectly and I get my results.I ran the parse server with
VERBOSE=1
and this is what I got:After this, I tried running the queries manually with curl requests. I tried querying
my local parse server and the hosted service. This is the result:
(This last result is cut short, again to avoid NDA issues, but it's the right result.)
Do you have any idea of what is wrong here?
Thanks in advance.
The text was updated successfully, but these errors were encountered: