-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
containedIn does not work with LiveQuery #296
Comments
Thanks for opening this issue!
|
LiveQuery doesn't support every type of query. You can see one of the newer PR's on the server that added more constraints, parse-community/parse-server#7113 and check here for all current, https://github.com/parse-community/parse-server/blob/alpha/spec/QueryTools.spec.js. If you find something missing that you think should be added on the server, I suggest opening an issue there with a possible PR to fix. You may also want open an issue for the live query server to throw an error if a query isn’t supported. More info can be found in the LiveQuery Spec, https://github.com/parse-community/parse-server/wiki/Parse-LiveQuery-Protocol-Specification#subscribe-message From your log:
The Swift SDK passes If you find |
Pardon additional question... Is this issue about updating the query after it is subscribed for the first time? Because I am actually using "containedIn" as per command above and it is working. I just have to unsubscribe it and subscribe again whenever I need to change the array of the criteria |
No unfortunately despite the subscription I would get zero updates/deletions etc. What version of parse server are you on? |
@EliteTechnicalCare you should provide more information in your question. For example, show all of your complete I suspect the Also, you should check if your regular
For questions, you should ask here: https://community.parseplatform.org as oppose to opening issues. |
parties is an Array not a pointer.
As I specified in my original post, the query works perfectly fine, it simply doesn't auto update after the initial fetch.
What question have I asked this entire thread? |
Your original post and everything after doesn’t signal there’s an actual issue. You haven’t provided enough information to elude to an issue or even replicate an issue. It seems, from your post, you are probably not setting up your queries correctly which is why this is labeled as a question. If your ask the question, “how to properly setup a live query using containedIn?” on the link I provided and provide the details of your ParseObjects and queries, you will most likely get what you need. If there happens to be a bug with correct setup, then you should open an issue.
Your original post looks sketchy and doesn't provide enough info as I mentioned here. Your post is better suited as a question until we can see you are querying correctly and there's in fact a real bug. |
Which is why it works perfectly fine until I attempt a LiveQuery with it. I haven't asked a question, I understand how queries work. They are working perfectly fine, the only issue is when I use a query with containedIn with LiveQuery. Every other query ive tested works fine with LiveQuery. So I know how to use LiveQuery. Every time Ive used containedIn for normal queries works fine. So I know how to use containedIn. Only issue I am having is when I am using containedIn with LiveQuery. @lsmilek1 says it works with him so the only thing I asked him was what server version he is running. I am not denying that this could very well be a server issue, but I am not here for a tutorial on how to do queries. Rather, I am trying to pin point where the issue is and report it (if need be). I am not trying to be difficult, I have left this issue closed etc but would be good to see what server version he is running so I can move forward in the right direction. |
I stated here, you provided examples that are "completely different" from each other, essentially you provided an apples to oranges comparison. Proper steps to flush out where your problem is:
If 1,2, and 3 works and 4 doesn't, then either:
If 1 and 2 work, and 3 and 4 doesn't work then either:
In any of the cases, you should be providing enough information when asking a question or opening an issue. Enough information requires providing your |
We will need you to provide necessary information I asked for in the previous comments to determine if it's indeed "perfectly fine." |
New Issue Checklist
Issue Description
containedIn query does not update LiveQuery
Steps to reproduce
Subscribe to a LiveQuery with a containedIn, will not update such as:
query = query.where(containedIn(key: "parties", array: [usersProfile.id]))
But a normal equals query seems to update perfectly:
query = query.where("senderID" == "VcF9fMCyKb")
Actual Outcome
Nothing, it will not update at all. Note the query containedIn loads perfectly fine when using fetch or even using the subscribedQuery but will not activate any of the events.
Environment
Client
Server
Database
Logs
When using containedIn
Successfully subscribed to new query Message ({"limit":100,"skip":0,"_method":"GET","where":{"parties":{"$in":["CwyLdNXNAH"]}}}) Saved Message
When using equals to (as you can see it updates both new messages and editing old ones)
The text was updated successfully, but these errors were encountered: