Attributes of an entity to update. Not all properties are required. Setting a nullable property to null will remove the attribute from the item.
For @ObjectAttribute fields, all nested fields are Partial — you only need to provide the
fields you want to change. Omitted fields are preserved in DynamoDB via document path expressions.
A list is written whole, so each element of a list of objects keeps its required fields, while a
nullable field inside an element takes null and the element is stored without it.
awaitCustomer.update("customer-1", { name:"Jane Smith", // Sets new value phone:null// Removes the value. A compile error if the attribute is not nullable });
Example: Partial ObjectAttribute update
awaitStore.update("store-1", { address: { street:"456 Oak Ave" } // Only updates street, preserves other fields });
Example: A nullable field inside a list element
// Replaces the contacts; Sam's is stored without a phone awaitStore.update("store-1", { address: { contacts: [{ name:"Sam", phone:null }] } });
Attributes of an entity to update. Not all properties are required. Setting a nullable property to null will remove the attribute from the item.
For
@ObjectAttributefields, all nested fields arePartial— you only need to provide the fields you want to change. Omitted fields are preserved in DynamoDB via document path expressions.A list is written whole, so each element of a list of objects keeps its required fields, while a nullable field inside an element takes
nulland the element is stored without it.