Primitive
atom.updateDataFields
BETAShort name: updateDataFields
Version: 1.0.0
System primitive that writes a bag of top-level atom.data fields by delegating each key to atom.findOrCreateDataField. This is a sequential loop and not a single-document atomic update across all keys.
Back to primitive libraryInputs
| Key | Type | Required | Description |
|---|---|---|---|
| atomId | objectId | true | Atom whose data fields should be updated. |
| data | object | true | Object map whose keys are top-level data field names and whose values are the values to write. |
| expectedVersion | integer | false | Optional optimistic concurrency guard. When provided, the atom version must match before writing any fields. |
| protectedKeys | array | false | Optional list of field keys that are rejected when present in data. |
| valueTypes | object | false | Optional fieldName to AtomFieldInputType map. Unspecified keys use delegated default behavior. |
Outputs
| Key | Type | Required | Description |
|---|---|---|---|
| atom | object | false | Updated atom summary: { id, version } after the final write. |
| skippedKeys | array | false | Field keys whose input value was undefined and therefore skipped. |
| writtenKeys | array | false | Field keys that were written. |