Closed alino20 closed 3 years ago
See https://github.com/parse-community/Parse-SDK-JS/blob/master/src/ParseObject.js#L71
This is because of the way instances are created in Parse JS depending on your enviornment.
On Web clients there are single / shared instances which means objects with the same id will have same attributes. On Node they are unique instances.
I hope this helps.
Thanks. I changed my code according to your answer, and now it works as expected. Although I feel this should be somewhere in the documentations.
New Issue Checklist
Issue Description
Can't create pointers without dirty keys hence saving any object which includes these pointers results into cascade save. This is gonna throw an error if this pointer is in another object and user does not have the permission to save this pointer's object so cascade save results into error. Additionally can't create multiple instance of one object (with id) with different dirty keys without saving them because all of them share the same fields.
Steps to reproduce
Actual Outcome
Console prints
a: 2
and the dirty keys are['a']
Expected Outcome
Console prints should be
a: 1
and the dirty keys should be[]
Environment
Server
Database
Client
Logs