Skip to content

Mongo ORM: update accessor has no inc/mul on a nullable number field #30515

Closed

Description

@wmadden-electric

What a user sees. On a nullable number field (Int32?, Double?), the update accessor offers no inc or mul. The accessor's conditional type distributes over number | null, so the numeric operations drop out. $inc works on a missing field at runtime; the server refuses $inc on a stored null.

Dates from ef88f94a04 (2026-04-14). The same accessor's handling of Int64 fields (which are bigint) is being fixed separately.

Likely fix. Compute the numeric operations from the non-null part of the field's type; add a type test.

Found while fixing manual-QA findings for the Mongo defaults, codecs and Prisma 6 source project.

Activity

  1. added a commit that references this issue on Nov 17, 2026
    4912564
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