-
Notifications
You must be signed in to change notification settings - Fork 603
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
Allow NULL to be used as a property value #1082
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
@stephenplusplus : Would this be better as a separate if-statement line for nulls? |
This doesn't actually work. The problem isn't with saving null data, but detecting a null value when it's returned from the API. We talked about this in #1022, and the easiest thing to do is wait for native support for a null value in the next version of Datastore, v1beta3... which hopefully is coming soon! |
Yes, reading the value back is a separate issue though. At least being able to put a null value into the datastore can be supported immediately. I, for one have no problem reading back the values, because I use a separate field which stores the entire JSON object I am interested in. Other people could do a work-around if they know the intended type of the field. There really is no work-around possible for not being able to put null into the datastore. |
Since v1beta3 is around the corner, waiting for native support without side effects seems like the best solution to me. Supporting setting but not getting feels irresponsible for our library. However, feel free to share your examples in #1022, which will involve people who have already considered this problem. Maybe with all of our heads combined, we can find a solid way to support this now. |
Ok. How soon is v1beta3 coming? |
Fix for bug #1081