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 looking at #1798 found that setting multiple properties on the same object locally without saving reports the wrong object back. It will only show (this is true for set and unset) the latest Op you added to that property and not all. So setting data.b
and data.c
without saving (or you're offline), causes data.b
to not be set.
When the object gets saved, the properties show up on get as expected.
Steps to reproduce
const myObj = new Parse.Object('MyClass');
myObj.set('data', {a: 5});
await myObj.save(null, {useMasterKey: true});
myObj.set('data.b', 2);
myObj.set('data.c', 2);
console.log(myObj.get('data'));
Actual Outcome
{ a: 5, c: 2}
Expected Outcome
{ a: 5, b: 2, c: 2}
Environment
Server
- Parse Server version:
7.0.0
- Operating system:
OSX
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Local
Client
- Parse JS SDK version:
5.0.0