Open
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
afterSave triggers do not receive the correct updated object, if a deeply nested key was updated.
Steps to reproduce
- Create an afterSave trigger for a class
- Create a document with a deeply nested key:
const obj = new Parse.Object('GameScore');
obj.set('a', {'b':{'c':0}});
await obj.save();
- Change the deeply nested key
obj.set('a.b.c', 1);
await obj.save();
Actual Outcome
The afterSave triggers receives a wrong object (in request.object)
Expected Outcome
In the trigger call for the second save()
, the field a
of the received object should be {'b':{'c':1}}
Failing Test Case / Pull Request
- 🤩 I submitted a PR with a fix and a test case.
- 🧐 I submitted a PR with a failing test case.
Environment
Server
- Parse Server version: Latest commit as of 12 May 2021,
51e0800
- Operating system:
any
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
local
Database
- System (MongoDB or Postgres):
MongoDB
- Database version:
v4.4.5
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
local
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
any
- SDK version:
any