Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created items not returned when using a transaction #388

Open
raryanpur opened this issue Jun 6, 2024 · 2 comments
Open

Created items not returned when using a transaction #388

raryanpur opened this issue Jun 6, 2024 · 2 comments

Comments

@raryanpur
Copy link

raryanpur commented Jun 6, 2024

Describe the bug
When creating an entity/entities within a transaction, the returned data[].items are null instead of the created object(s). Per the documentation for creating an entity, "By default, after writing to DynamoDB, ElectroDB will format and return the record through the same process as a Get/Query". Since item mutations use the same semantics within transactions (except for terminating with commit instead of go), would think the correct behavior would be for the returned data[].items to hold the created object(s).

ElectroDB Version
2.14.1

Expected behavior
data[].items for created items should hold the created objects.

Additional context
Current workaround is to get the items after they're created.

@raryanpur
Copy link
Author

Linking relevant discussion #364

@ides15
Copy link
Contributor

ides15 commented Jun 9, 2024

I've been starting to use .params() and passing it to the parse function... it works but not 100% ideal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants