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

Entity should not require a Key #471

Closed
dhermes opened this issue Dec 29, 2014 · 4 comments
Closed

Entity should not require a Key #471

dhermes opened this issue Dec 29, 2014 · 4 comments
Assignees
Labels
api: datastore Issues related to the Datastore API. 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@dhermes
Copy link
Contributor

dhermes commented Dec 29, 2014

Relates to
https://docs.google.com/document/d/1xKw8Tz6lfN5uOcv0my4uUgFSeDoRzwCLho2UGlBpqDU/edit

From the spec:

An entity must have a key, unless otherwise documented (for example, an entity in
<code>Value.entityValue</code> may have no key). An entity's kind is its key's path's
last element's kind, or null if it has no key.

Though not required, we should be opinionated (in the constructor) about when it's not necessary if possible.

@dhermes dhermes added the api: datastore Issues related to the Datastore API. label Dec 29, 2014
@tseaver
Copy link
Contributor

tseaver commented Dec 30, 2014

I'm not sure we should enable direct creation of an Entity w/o a key: such objects wouldn't be able to satisfy the rest of the contract (save(), etc.). When marshalling a "sub-entity" from value.entityValue, wouldn't it be more natural just to have that property's value be a dict?

@dhermes
Copy link
Contributor Author

dhermes commented Dec 30, 2014

I just filed this based on @Alfus comments. Any thoughts @Alfus?

@Alfus
Copy link

Alfus commented Jan 2, 2015

In an entity value, the key can be present, partial or missing. This lets the value handle dicts (no key) and entities (with partial or complete keys).

@dhermes
Copy link
Contributor Author

dhermes commented Jan 15, 2015

This is not an issue any longer, the Key is not required and failure occurs naturally in methods than need a Key.

@dhermes dhermes closed this as completed Jan 15, 2015
@jgeewax jgeewax modified the milestone: Datastore Stable Jan 30, 2015
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
atulep pushed a commit that referenced this issue Apr 6, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
atulep pushed a commit that referenced this issue Apr 6, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
atulep pushed a commit that referenced this issue Apr 18, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this issue Jun 4, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Jun 4, 2023
* chore: Update gapic-generator-python to v1.9.0

PiperOrigin-RevId: 517425588

Source-Link: googleapis/googleapis@33c93eb

Source-Link: googleapis/googleapis-gen@d5f5978
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDVmNTk3ODlkMTlmYzQzMjcwZmYyMTI0OTY3ZDRlYzg5OTJiOGU4ZiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Sep 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Oct 21, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Oct 21, 2023
…p/templates/python_library/.kokoro (#471)

Source-Link: https://togithub.com/googleapis/synthtool/commit/bb171351c3946d3c3c32e60f5f18cee8c464ec51
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f62c53736eccb0c4934a3ea9316e0d57696bb49c1a7c86c726e9bb8a2f87dadf
parthea added a commit that referenced this issue Oct 22, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
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. 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

5 participants