Closed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest versions of Parse Server and the Parse JS SDK.
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
- Create an object using .save, such as:
const obj = new Parse.Object('Test')
obj.set('foo', 'bar');
await obj.save();
- Use query.subscribe on that object, using .select for certain keys
const subscription = await new Parse.Query('Test').select('key').subscribe();
- Trigger a subscription event from the cloud / a different client
- 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