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

Properly handling entity meanings in datastore. #1241

Merged
merged 1 commit into from
Dec 21, 2015

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Nov 24, 2015

To do this, added entity_to_protobuf method that could be used recursively. Also solves #1206 since recursively serializing nested entities to protobuf was being done incorrectly.

Fixes #1065. Fixes #1206.

@dhermes dhermes added the api: datastore Issues related to the Datastore API. label Nov 24, 2015
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 24, 2015
@dhermes
Copy link
Contributor Author

dhermes commented Nov 24, 2015

@tseaver I think this spells the end of inheriting from dict.

meaning, orig_value = entity._meanings[name]
# Only add the meaning back to the protobuf if the value is
# unchanged from when it was originally read from the API.
if orig_value is value:

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor Author

dhermes commented Dec 1, 2015

@tseaver Bump

2 similar comments
@dhermes
Copy link
Contributor Author

dhermes commented Dec 9, 2015

@tseaver Bump

@dhermes
Copy link
Contributor Author

dhermes commented Dec 16, 2015

@tseaver Bump

@dhermes
Copy link
Contributor Author

dhermes commented Dec 17, 2015

@tseaver It is now merge-able

"""
meaning = None
if is_list:
all_meaning = True

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

To do this, added entity_to_protobuf method that could be used
recursively. Also solves googleapis#1206 since recursively serializing
nested entities to protobuf was being done incorrectly.

Fixes googleapis#1065. Fixes googleapis#1206.
@dhermes
Copy link
Contributor Author

dhermes commented Dec 19, 2015

@tseaver PTAL, I went with the simpler version of _get_meaning and we should be all set.

@tseaver
Copy link
Contributor

tseaver commented Dec 21, 2015

LGTM

dhermes added a commit that referenced this pull request Dec 21, 2015
Properly handling entity meanings in datastore.
@dhermes dhermes merged commit 0870be4 into googleapis:master Dec 21, 2015
@dhermes dhermes deleted the store-meanings branch December 21, 2015 21:10
parthea pushed a commit that referenced this pull request Sep 22, 2023
…/python-docs-samples#1241)

Protobuf handles the base64 encoding for you, and so the content was being base64 encoded twice.
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.

3 participants