Skip to content

LiveQuery does not match subobjects in query specified with dot notation #3321

Closed
@dstarke

Description

@dstarke

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

--

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

  1. Create an object with a nested subobject as its value
  2. Construct a query that selects objects based on a value in the subobject using dot notation.
  3. Issue the query, confirm that the object is returned by the query
  4. Subscribe to the query to get LiveQuery updates
  5. Update the object you created in step 1.
  6. 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

Logs/Trace

(no relevant logs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions