You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting object.set("a.b", false) and then saving the object updates the whole object a, not only the nested key b. If value for x changed between fetching and saving the object, the value will be overwritten. I assume the whole field of the Parse object is flagged as dirty, therefore the whole field is updated, so there may not be much we can do about this.
MongoDB allows to update only a nested key with the $set command without affecting other fields.
c) Cannot set value for excluded key.
For example for this object:
{
"_id": "abc123",
"a": {
"b": true
}
}
When fetching the object without field a no updates to that field can be saved:
a) Value for key in nested object deeper than 1 level should be set.
b) It should be possible to update only one key of a nested object without affecting other keys.
c) It should be possible to update a field value even if it was excluded.
Actual Outcome
See description.
Environment Setup
Server
parse-server version (Be specific! Don't say 'latest'.) : "3.10.0"
parse JS SDK: cloud code, according to parse server "3.10.0"
Operating System: -
Hardware: -
Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): -
Database
MongoDB version: 4.2.3
Storage engine: WT
Hardware: -
Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): AWS
Logs/Trace
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Issue Description
3 Issues, maybe related:
a) Cannot set value for key in nested object deeper than 1 level.
For example for this object:
Changing key
object.set("a.b.c", false);
results in:Changing key
object.set("a.b", false);
works as expected, so the bug only affects keys deeper than 1 level.b) Cannot set value for key in nested object without affecting the whole field.
For example for this object:
Setting
object.set("a.b", false)
and then saving the object updates the whole objecta
, not only the nested keyb
. If value forx
changed between fetching and saving the object, the value will be overwritten. I assume the whole field of the Parse object is flagged as dirty, therefore the whole field is updated, so there may not be much we can do about this.MongoDB allows to update only a nested key with the
$set
command without affecting other fields.c) Cannot set value for excluded key.
For example for this object:
When fetching the object without field
a
no updates to that field can be saved:Results in no changes to the object.
Steps to reproduce
See above.
Expected Results
a) Value for key in nested object deeper than 1 level should be set.
b) It should be possible to update only one key of a nested object without affecting other keys.
c) It should be possible to update a field value even if it was excluded.
Actual Outcome
See description.
Environment Setup
Server
Database
Logs/Trace
The text was updated successfully, but these errors were encountered: