You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LiveQuery does not match subobjects in query specified with dot notation #3321
You have filled out every section below. Issues without sufficient information are more likely to be closed.
--
Issue Description
Parse Server allows you to specify queries on nested subobjects using dot notation. For example, the query specified using query.equalTo("status.x", "someValue"); will match objects where there is a status attribute whose value is an object with the key x and the value "someValue".
Although this works correctly for queries issued through the REST API, the LiveQuery system does not correctly match objects based on this type of constraint. As a result, queries that use this type of key specification can return objects that the LiveQuery system will not return notifications for.
Steps to reproduce
Create an object with a nested subobject as its value
Construct a query that selects objects based on a value in the subobject using dot notation.
Issue the query, confirm that the object is returned by the query
Subscribe to the query to get LiveQuery updates
Update the object you created in step 1.
Note that no LiveQuery updates for this object are received by the client.
Expected Results
Client should receive LiveQuery updates
Actual Outcome
Client does not receive LiveQuery updates
Environment Setup
Server
parse-server version (Be specific! Don't say 'latest'.) : 2.3.1
Operating System: macOS Sierra 10.12.2
Hardware: MacBook Pro (15-inch, Late 2011)
Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): Localhost (also observed running on Azure)
Database
MongoDB version: 3.2.11
Storage engine: MMAPv1
Hardware: unknown
Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): mLab
Hi @dstarke
Thanks for your effort that enable dot notation query of Live Query.
There is something weird that you mention that query.equalTo("status.x", "someValue"); can work. But I tried using this kind of query in iOS, it failed.
It is supported in Parse-server, querying with dot notations.
As for the support for more complex queries, the main barrier is that the current implementation is synchronous and doesn't touch the DB for performance reasons. We'd have to make the query matching async first, and then add the support for such query constraints, this time, with DB access.
@flovilmart I'am afraid that I can't handle these issue currently, I am zero experience on Node.js developement. I'll try to start studyin on Node.js, if I am ready, I'll tell you later :)
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.
Activity
ananfang commentedon Apr 13, 2017
Hi @dstarke
Thanks for your effort that enable dot notation query of Live Query.
There is something weird that you mention that
query.equalTo("status.x", "someValue");can work. But I tried using this kind of query in iOS, it failed.Is it possible that query with dot notation?
flovilmart commentedon Apr 13, 2017
It is supported in Parse-server, querying with dot notations.
As for the support for more complex queries, the main barrier is that the current implementation is synchronous and doesn't touch the DB for performance reasons. We'd have to make the query matching async first, and then add the support for such query constraints, this time, with DB access.
ananfang commentedon Apr 13, 2017
Thanks for your reply @flovilmart.
Is there any schedule you plan to implement querying with dot notations?
flovilmart commentedon May 6, 2017
@ananfang for now, no schedule i'm afraid, but if you feel you want to tackle the issue, i could help you get going :)
ananfang commentedon May 8, 2017
@flovilmart I'am afraid that I can't handle these issue currently, I am zero experience on Node.js developement. I'll try to start studyin on Node.js, if I am ready, I'll tell you later :)
flovilmart commentedon May 8, 2017
It's ok, always a good opportunity to learn.
stale commentedon Sep 18, 2018
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.