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

Support Null Values #285

Open
simonmumenthaler opened this issue Mar 30, 2020 · 2 comments
Open

Support Null Values #285

simonmumenthaler opened this issue Mar 30, 2020 · 2 comments

Comments

@simonmumenthaler
Copy link
Contributor

The default behaviour of dynamo-easy filters out all null (or undefined) values before the mapper function toDb is called. So it's not possible to store null as { NULL: true }

It'd be nice to have real null value support.

It could be sth like this:

@Property({ nullable: true, type: String })
myProperty: string | null

--> as soon as we define string | null as type it's necessary to provide the actual type to the decorator since reading the reflection information design:type will return Object.

Another option would be to globally define how to handle null values. But then it's less explicit and I think the default behaviour of not storing null is mostly preferred.

@dhmw
Copy link

dhmw commented Sep 8, 2021

This is absurd - how can this not be implemented?

@dhmw
Copy link

dhmw commented Sep 8, 2021

I looked into this a bit and found that null was being deliberately excluded from mapping; I've raised a PR to rectify this: #361

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

No branches or pull requests

2 participants