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

Empty List and Maps #156

Open
mataide opened this issue Jun 16, 2018 · 2 comments
Open

Empty List and Maps #156

mataide opened this issue Jun 16, 2018 · 2 comments
Labels

Comments

@mataide
Copy link

mataide commented Jun 16, 2018

As by Docs:

Attribute Values
An attribute value cannot be an empty String or empty Set (String Set, Number Set, or Binary Set). However, empty Lists and Maps are allowed.

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html

Doing some tests, dynamodb allow empty List and Maps, but I cant create using Dynogels.

When you try to save a model using create method, it saves but without the empty values.
When you try to save a model using update method, it saves but with the empty values.

@Denjul
Copy link

Denjul commented Feb 7, 2019

You are correct, dynomodb supports empty Lists and Maps.

But in the create method in dynogels they omit empty String Set, Number Set, or Binary Set but they also omits empty Lists and Maps(don't know if it's a big change to allow empty Lists and Maps)

What i did was to skip the create method and instead do an update call which have Conditional Expression that the key cannot exist.
An ugly workaround but it works.

PS: You dont get the auto generated createdAt if you use a update call instead

@jvinai
Copy link

jvinai commented Mar 13, 2020

No update on it ?

@cdhowie cdhowie added the bug label Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants