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

Allow NULL to be used as a property value #1082

Closed
wants to merge 1 commit into from

Conversation

krisnye
Copy link

@krisnye krisnye commented Jan 21, 2016

Fix for bug #1081

@googlebot
Copy link

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!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Jan 21, 2016
@krisnye
Copy link
Author

krisnye commented Jan 21, 2016

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Jan 21, 2016
@jgeewax
Copy link
Contributor

jgeewax commented Jan 21, 2016

@stephenplusplus : Would this be better as a separate if-statement line for nulls?

@stephenplusplus
Copy link
Contributor

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!

@stephenplusplus stephenplusplus added the api: datastore Issues related to the Datastore API. label Jan 21, 2016
@krisnye
Copy link
Author

krisnye commented Jan 21, 2016

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.

@stephenplusplus
Copy link
Contributor

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.

@krisnye
Copy link
Author

krisnye commented Jan 21, 2016

Ok. How soon is v1beta3 coming?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants