Skip to content

containedIn does not work with LiveQuery #296

Closed
@davidhakki

Description

@davidhakki

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

  • Parse Swift SDK version: 2.3.1
  • Xcode version: 13.1
  • Operating system (iOS, macOS, watchOS, etc.): macOS
  • Operating system version: 12.0.1

Server

  • Parse Server version: 4.4.0
  • Operating system: No idea
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Back4App

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 3.6
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Back4App

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)

Successfully subscribed to new query Message ({"limit":100,"skip":0,"_method":"GET","where":{"senderID":"VcF9fMCyKb"}})
Saved Message
Optional([Message ({"spouseID":"CwyLdNXNAH","time":{"__type":"Date","iso":"2021-12-07T23:09:16.057Z"},"senderID":"VcF9fMCyKb","read":true,"text":"Nice","objectId":"O0rkPsUIVw","updatedAt":{"__type":"Date","iso":"2021-12-07T23:26:08.452Z"},"createdAt":{"__type":"Date","iso":"2021-12-07T23:09:16.127Z"},"parties":["VcF9fMCyKb","CwyLdNXNAH"]}), Message ({"spouseID":"CwyLdNXNAH","time":{"__type":"Date","iso":"2021-12-08T00:15:56.536Z"},"senderID":"VcF9fMCyKb","read":true,"text":"Ok wow","objectId":"KBz1yl6SHs","updatedAt":{"__type":"Date","iso":"2021-12-08T00:34:56.260Z"},"createdAt":{"__type":"Date","iso":"2021-12-08T00:15:56.639Z"},"parties":["VcF9fMCyKb","CwyLdNXNAH"]})])
Updated: Message ({"spouseID":"CwyLdNXNAH","time":{"__type":"Date","iso":"2021-12-08T00:15:56.536Z"},"senderID":"VcF9fMCyKb","read":true,"text":"Ok wow","objectId":"KBz1yl6SHs","updatedAt":{"__type":"Date","iso":"2021-12-08T00:34:56.260Z"},"createdAt":{"__type":"Date","iso":"2021-12-08T00:15:56.639Z"},"parties":["VcF9fMCyKb","CwyLdNXNAH"]})
Updated: Message ({"spouseID":"CwyLdNXNAH","time":{"__type":"Date","iso":"2021-12-07T23:09:16.057Z"},"senderID":"VcF9fMCyKb","read":true,"text":"Nice too","objectId":"O0rkPsUIVw","updatedAt":{"__type":"Date","iso":"2021-12-08T00:35:07.796Z"},"createdAt":{"__type":"Date","iso":"2021-12-07T23:09:16.127Z"},"parties":["VcF9fMCyKb","CwyLdNXNAH"]})
Entered: Message ({"spouseID":"VcF9fMCyKb","time":{"__type":"Date","iso":"2021-12-07T23:26:20.541Z"},"senderID":"VcF9fMCyKb","read":true,"text":"Cool","objectId":"gJCz7b6cIW","updatedAt":{"__type":"Date","iso":"2021-12-08T00:36:17.128Z"},"createdAt":{"__type":"Date","iso":"2021-12-07T23:26:20.635Z"},"parties":["CwyLdNXNAH","VcF9fMCyKb"]})

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions