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

How do we deal with nil/null/undefined in maps? #11

Open
samedhi opened this issue Jan 10, 2017 · 0 comments
Open

How do we deal with nil/null/undefined in maps? #11

samedhi opened this issue Jan 10, 2017 · 0 comments

Comments

@samedhi
Copy link
Owner

samedhi commented Jan 10, 2017

I think the rule should be that passing in nil always results in nil being written to the datastore. If you want to use the default value then don't include the key.

Or maybe it is the intersection of nil, default, and required? Should it automatically write the default in the event that it is also required and nil is passed in as a named value?

Thinking about it a bit more, I kind of feel that nil just shouldn't be allowed at all as a value to a property. nil should be indicated by the absence of a property, not by the fact that there is property that has been written with nil.

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

1 participant