-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Labels
type:featureNew feature or improvement of existing featureNew feature or improvement of existing feature
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 version of Parse Server.
Issue Description
It seems that Parse recognizes changes in the 'array' column and will save the changes even without an explicit 'set'.
Steps to reproduce
const files = object.get('files'); // files is an array
files[0].aa = 'bb';
console.log(object.dirtyKeys()); // ==> ['files']
object.set('anotherCol', someVal);
object.save(); // the object's 'anotherCol' and 'files' columns are both updated.
Actual Outcome
'files' is a dirty key and is updated upon .save() even without an explicit 'set'.
Expected Outcome
'files' is not a dirty key unless user 'set' the change like: object.set('files', value)
Environment
Server
- Parse Server version:
5.2.0
- Operating system:
Amazon Linux 2
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
AWS
Database
- System (MongoDB or Postgres):
MongoDB
- Database version:
5.0.17
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
MongoDB Atlas,
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
JavaScript
- SDK version:
3.4.0
Logs
Metadata
Metadata
Assignees
Labels
type:featureNew feature or improvement of existing featureNew feature or improvement of existing feature