Repository navigation
Support put for parameters of type FullEntity<IncompleteKey> in v1beta3 #638
Description
Activity
- addedapi: datastoreIssues related to the Datastore API.Issues related to the Datastore API.
on Feb 11, 2016 Is this really necessary? The behavior of
addandputfor incomplete keys kind of overlaps in my mind, am I wrong? Isn'tadd(FullEntity<?>... entities)already enough to handle the creation of entities with incomplete keys?If we must support this then we should also change
putsignature toList<Entity> put(FullEntity<?>... entities)
so that we return the generated complete keys (this might be a bit counter-intuitive as we remove duplicates from input entities, hence returned entities do not necessarily match the input). Thoughts? /cc @aozarov
In v1beta2* the datastore forced separating the entities with non complete keys which could only be used for
addoperations. v1beta3 now allows to specify incomplete keys also forputoperations.A user can mimic this by (1) in the program separate the entities that are incomplete and use them in
addinstead ofput(2) use batch to allow committing it in 1 RPC. However, that require some boilerplate code which now could be avoided.I don't think this issue is a high priority, but worth fixing when possible.
Yes, in that case theputshould return aList<Entity>similar toadd.
Also,DatastoreBatchWriterwill need to support it by either adding
putWithDeferredIdAllocationor decouplingDatastoreBatchWriterfromDatastoreWriter.A user can mimic this by (1) in the program separate the entities that are incomplete and use them in add instead of put (2) use batch to allow committing it in 1 RPC. However, that require some boilerplate code which now could be avoided.
I see. I just wanted to understand the reason for this.
In
putnow we remove duplicates in the input entities, should the returned list of updated/added entities have the cardinality (and order) of the input or of the input-without-duplicates? Both ways might seem a bit strange at first.We should return the list of entities matching the order of the input.
De-dup is an internal implementation detail and should only apply to entities with complete keys (obviously) and the same result should be associated with all the entities with matching keys.- added a commit that references this issue
on Jun 21, 2022 - added a commit that references this issue
on Jun 29, 2022 - added 2 commits that reference this issue
on Sep 15, 2022 - added 2 commits that reference this issue
on Feb 1, 2023 - added a commit that references this issue
on Dec 22, 2025 - added a commit that references this issue
on Jan 6, 2026 - added a commit that references this issue
on Jan 22, 2026 - added 2 commits that reference this issue
on Feb 24, 2026 - added a commit that references this issue
on Mar 11, 2026 - added 2 commits that reference this issue
on Mar 12, 2026 - added a commit that references this issue
on Mar 30, 2026 - added a commit that references this issue
on Apr 1, 2026 - added 2 commits that reference this issue
on Apr 29, 2026 - added a commit that references this issue
on Jul 13, 2026