Skip to content

Dot notation write several levels deep into an Object field is handled inconsistently across adapters #10806

Open

Description

@mtrezza

New Issue Checklist

Issue Description

A dot notation write whose path descends through a stored value that is not a container (a scalar) inside an Object field is handled inconsistently across storage adapters, and PostgreSQL loses the original value.

Given a class with an Object field objectField storing { numberField: 5 }, an update with { "objectField.numberField.child": null } (i.e. writing child beneath the scalar numberField):

  • PostgreSQL: returns 200 and silently replaces the scalar, storing objectField = { numberField: { child: null } } — the original 5 is lost.
  • MongoDB: returns HTTP 500 (an internal path-conflict error), leaving the object unchanged.

Steps to reproduce

  1. Create a class with an Object field, e.g. objectField.
  2. Create an object: { "objectField": { "numberField": 5 } }.
  3. Update it with a dot notation key descending through the scalar: { "objectField.numberField.child": null }.
  4. Read the object back and compare across MongoDB and PostgreSQL.

Actual Outcome

  • PostgreSQL: objectField becomes { numberField: { child: null } } (the stored 5 is silently discarded).
  • MongoDB: HTTP 500; object unchanged.

Expected Outcome

Consistent, non-lossy behavior across adapters — either a clear client error (4xx) on both, or preservation of the existing value. A scalar intermediate value should not be silently replaced, and an invalid nested write should not surface as a 500.

Environment

Reproduced on current alpha (9.x) and release-8.x.x (8.x); not adapter-version specific.

Notes

Not security-sensitive: it only affects freeform nested data inside an Object field, for an object the caller can already write.

Activity

  1. parse-github-assistant commented on Oct 19, 2026

    @parse-github-assistant

    🚀 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.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions