Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting nested fields to objects #1363

Closed
4 tasks done
mstniy opened this issue May 13, 2021 · 4 comments
Closed
4 tasks done

Setting nested fields to objects #1363

mstniy opened this issue May 13, 2021 · 4 comments

Comments

@mstniy
Copy link
Contributor

mstniy commented May 13, 2021

New Issue Checklist

Issue Description

Setting nested fields to objects currently does not work.

Steps to reproduce

  1. Create a new Parse object with an empty Object field, called data.
const o = new Parse.Object('Person');
o.set('data', {});
  1. Save the object to create it
await o.save();
  1. Set data.a to the empty object, {}
o.set('data.a', {});
  1. Save the object to update it
await o.save();
  1. Use Parse.Object.get('data') to read the value back

Actual Outcome

The call to .get('data') returns {} , effectively ignoring the update.

Expected Outcome

The call to .get('data') should return {a:{}}

Environment

Server

  • Parse Server version: master, as of 13th of May
  • Operating system: Ubuntu 20.04
  • 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

  • Parse JS SDK version: master, as of 13th of May

Logs

@mstniy
Copy link
Contributor Author

mstniy commented May 13, 2021

Relevant pull requests: #729, #1301

Note that none of the tests added by these pull requests test the scenario where a non-existent nested field is set to an object.

@dplewis
Copy link
Member

dplewis commented May 14, 2021

@mstniy Since you are looking into nested objects can help out with this issue #1343

@dplewis
Copy link
Member

dplewis commented May 14, 2021

Closing via #1364

@dplewis dplewis closed this as completed May 14, 2021
@mstniy
Copy link
Contributor Author

mstniy commented May 14, 2021

@mstniy Since you are looking into nested objects can help out with this issue #1343

Let's see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants