Skip to content

fix(mongo): full-document Save uses $set and cannot unset deleted fields #778

Description

@ZhuchkaTriplesix

Summary

The JSON editor removes _id then $sets the remaining map. Fields the user deleted in JSON remain in the document. Nested replacements also cannot drop keys.

Scope

  • Persist via replaceOne (whole document except _id) or compute $unset for keys present in the original and absent in the edited JSON.
  • Keep _id immutable.
  • Test: start {a:1,b:2}, save {a:1}b is gone.

Out of scope

  • Inspector single-field $set (correct for that path).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend database driver execution and queriesbugSomething isn't workingfrontendTheme parser epic label: frontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions