Skip to content

Keys are stripped upon subscription update with LiveQuery.select #1487

Closed
@dblythy

Description

@dblythy

New Issue Checklist

Issue Description

When you have a LiveQuery using .select, the Parse JS SDK removes all other data from any existing matching object.

Steps to reproduce

  1. Create an object using .save, such as:
const obj = new Parse.Object('Test')
obj.set('foo', 'bar');
await obj.save();
  1. Use query.subscribe on that object, using .select for certain keys
const subscription = await new Parse.Query('Test').select('key').subscribe();
  1. Trigger a subscription event from the cloud / a different client
  2. Now obj.get('foo') will be undefined

Actual Outcome

Incoming Live Query payload overrides all keys

Expected Outcome

New incoming changes to merge with existing object

Environment

Server

  • Parse Server version: 5.3
  • Operating system: macOS
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): localhost

Database

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

Client

  • Parse JS SDK version: 3.4.2

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions