Skip to content

Partially updating an object sends the full object to the server #242

Closed
@dblythy

Description

@dblythy

New Issue Checklist

Issue Description

When fetching a saved object and then calling .save, all keys are marked as dirty and saved to the backend, causing unnecessary traffic and database ops.

Steps to reproduce

  1. Fetch an existing object
  2. Have a Parse Cloud beforeSave trigger that logs object.dirtyKeys().

Actual Outcome

All fields are dirty.

Expected Outcome

No fields should be dirty unless mutated.

Environment

Client

  • Parse Swift SDK version: 1.9.10
  • Xcode version: 10.15.7
  • Operating system (iOS, macOS, watchOS, etc.): iOS
  • Operating system version: 14.7

Server

  • Parse Server version: 4.5.0
  • Operating system: macOS
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): localhost

Database

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

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions