Hi, each System-allocated ID values are guaranteed unique to the entity 
group. As our docs state here [1]: "Each entity in a Datastore mode 
database has a key that uniquely identifies it."

If you copy an entity from one entity group or namespace to another and 
wish to preserve the ID part of the key, be sure to allocate the ID first 
to prevent Datastore from selecting that ID for a future assignment [2]. 
This might be applicable to the issue you are facing.

Note that you can create an entity without specifying an ID, in which case 
datastore automatically generates a numeric ID. If you choose to specify 
some IDs and then let Cloud Datastore automatically generate some IDs, you 
could violate the requirement for unique keys. Is this what's happening in 
your case? To avoid this, reserve a range of numbers to use to choose IDs 
or use string IDs to avoid this issue entirely as our docs suggests [3].

I hope this answers your question and helps you to resolve the issue.

[1] https://cloud.google.com/datastore/docs/concepts/entities
[2] https://cloud.google.com/datastore/docs/concepts/entities#entity_groups
[3] 
https://cloud.google.com/appengine/docs/standard/python/ndb/creating-entity-keys#numeric_keys

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/c18022f2-44fe-4991-835b-831ab9b09c63%40googlegroups.com.

Reply via email to