Should the set operator update index values and convert Dates to ISO strings? #379
-
I noticed that when using set, if I set a value that is referenced in a GSI using the set operator, it doesn't update the GSI field. Is that working as designed? If I just update the object values directly, the GSI keys are updated. Say I have a gsi field like so:
This updates sk1 and also converts renewDate to an ISO string:
But this does not:
I also noticed that the renewDate does not get converted to an ISO string when using the set operator, but does when I just call update. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That is working as implemented. We should note that in the docs. The issue is a set expression is evaluated by DynamoDB if you give a compound expression, so we cannot convert types or expand the value templates that may use that value (sk1). |
Beta Was this translation helpful? Give feedback.
That is working as implemented. We should note that in the docs. The issue is a set expression is evaluated by DynamoDB if you give a compound expression, so we cannot convert types or expand the value templates that may use that value (sk1).