Skip to content

All updates to an object field except for the last one are ignored #1450

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

Closed
4 tasks done
mstniy opened this issue Feb 15, 2022 · 4 comments · Fixed by #1451
Closed
4 tasks done

All updates to an object field except for the last one are ignored #1450

mstniy opened this issue Feb 15, 2022 · 4 comments · Fixed by #1451
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@mstniy
Copy link
Contributor

mstniy commented Feb 15, 2022

New Issue Checklist

Issue Description

When updating multiple nested fields under the same object field using ParseObject.set, all updates except for the last one are dropped.

Steps to reproduce

const obj = new Parse.Object("MyObject");
obj.set("a",{});
await obj.save();
obj.set("a.b", 5);
obj.set("a.c", 6);

Actual Outcome

obj.attributes should be {a: {b:5, c:6}}

Expected Outcome

obj.attributes is {a: {c:6}}

Environment

Server

  • Parse Server version: irrelevant
  • Operating system: Ubuntu 20.04
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local, irrelevant

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 5.0.6
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local

Client

  • Parse JS SDK version: alpha (commit d084ac9be058d9b13f8ac2bbf04615f76dc2800d)

Logs

@parse-github-assistant
Copy link

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

mstniy added a commit to Ocell-io/Parse-SDK-JS that referenced this issue Feb 15, 2022
mstniy added a commit to Ocell-io/Parse-SDK-JS that referenced this issue Feb 16, 2022
mstniy added a commit to Ocell-io/Parse-SDK-JS that referenced this issue Dec 19, 2023
mstniy added a commit to Ocell-io/Parse-SDK-JS that referenced this issue Dec 19, 2023
mortenmo added a commit to mortenmo/Parse-SDK-JS that referenced this issue Apr 29, 2024
mstniy added a commit to Ocell-io/Parse-SDK-JS that referenced this issue May 1, 2024
mstniy added a commit to Ocell-io/Parse-SDK-JS that referenced this issue May 1, 2024
mstniy added a commit to Ocell-io/Parse-SDK-JS that referenced this issue May 1, 2024
@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label May 1, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.1.0-alpha.7

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label May 1, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.1.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label May 16, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.1.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants