-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
Describe the bug
Using upsert on an entity with attributes as index results in a UpdateExpression that tries to update the key, which then fails. I can work around it using update().set(), but I then have to first delete the index attribute from the upsert record, which typescript doesn't allow for non-optional properties. So just a bit annoying.
Oh and not directly related to this, but ignoreOwnership should apply to new records as well. Makes no sense to have an existing table that's partially populated with __edb_ fields.
ElectroDB Version
(e.g. 3.4.6)
Expected behavior
The index should not be included as part of the UpdateExpression.
Errors
ElectroError: Error thrown by DynamoDB client: "One or more parameter values were invalid: Cannot update attribute ip_addr. This attribute is part of the key" - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#aws-error
Metadata
Metadata
Assignees
Labels
No labels