You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document which Mongo update fields count as explicitly set for update defaults #30467
What a user sees. On MongoDB, an update default (temporal.updatedAt(), onUpdate: now) is skipped for a field the update sets explicitly. Mongo counts every top-level field the update document touches as explicit, whatever the operator: $set, $unset, $inc, $push. An update made only of operators other than $set still counts as non-empty and gets its defaults. SQL counts only $set-style assignments. The subsystem doc says "a field the write sets explicitly keeps its value" and "an update whose payload touches no field gets no generated values", but does not say which operators count, or that the rule differs from SQL.
Where.docs/architecture docs/subsystems/10. MongoDB Family.md (the execution defaults section) and the prisma-8 skill's contract reference; the behaviour lives in the Mongo ORM's update path in packages/2-mongo-family/5-query-builders/orm/src/collection.ts.
Likely fix. Add a sentence to both docs listing the operators that make a field explicit on MongoDB, next to the SQL rule, with one example per operator family.
Where it came from.#30403; the note was meant to land when the default runtime moved into the framework in #30406.
Activity