Skip to content

Setting nested fields to objects #1363

Closed
@mstniy

Description

@mstniy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions