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
However, when creating an update transaction. DDB toolbox treats an update of a string field to empty as equivalent to removing it. If this attribute happens to be required an error is thrown.
See src/classes/Entity/Entity.ts
elseif(this._table!._removeNulls===true&&(data[field]===null||String(data[field]).trim()==='')&&!Array.isArray(data[field])&&(!mapping.link||mapping.save)){// Verify attribute is not requiredif(schema.attributes[field].required)error(`'${field}' is required and cannot be removed`)REMOVE.push(`#${field}`)names[`#${field}`]=field}
It is OK for a required field to contain empty string as long as it is not PK/SK
The text was updated successfully, but these errors were encountered:
DynamoDB has supported empty values since 2020
https://aws.amazon.com/about-aws/whats-new/2020/05/amazon-dynamodb-now-supports-empty-values-for-non-key-string-and-binary-attributes-in-dynamodb-tables/
However, when creating an update transaction. DDB toolbox treats an update of a string field to empty as equivalent to removing it. If this attribute happens to be required an error is thrown.
See
src/classes/Entity/Entity.ts
It is OK for a required field to contain empty string as long as it is not PK/SK
The text was updated successfully, but these errors were encountered: