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
Describe the bug
I ported some code that uses create to the new Transaction API and the result from go does not include the same information. I would expect my created entity (with all the defaults and sets run) to be returned upon success.
I agree in this case it would be nice to receive back the item you created, similar to the put and create methods on an entity. I'll look into why this is not happening and report back 👍
I’m still relatively new to DynamoDB, so it is entirely possible I have missed something, but it seems that TransactWriteItems doesn’t support ReturnValues or any equivalent — except in the case of condition failure.
Maybe the types could be improved so that data[n].item is only present when the commit was rejected?
That said, it would be nice to get at default values that ElectroDB generates as part of a successful put or create. Maybe something like a data[n].committedItem value could be added to distinguish it from something that was returned from DynamoDB?
Describe the bug
I ported some code that uses
create
to the new Transaction API and the result fromgo
does not include the same information. I would expect my created entity (with all the defaults and sets run) to be returned upon success.ElectroDB Version
2.5.0
DynamoDB Client Version
3.296.0
ElectroDB Playground Link
Link
Code Example
Expected behavior
In a transaction context,
data[n].item
should contain the same content asitem.data
in a non-transaction context.Errors
Additional context
Logging:
Without Transaction:
With Transaction:
The text was updated successfully, but these errors were encountered: