If I arbitrarily set the id of a new entity to 1000, without using allocateIds first, could a later entity be automatically given the id 1000 and overwrite my original entity?
In pseudocode, if I have:
Entity e1;
e1.setId(1000);
datastore.put(e1);
… later…
Entity e2;
datastore.put(e2);
Is there any chance e2 will automatically be given the id 1000 and overwrite e1?
As explained in the Java API documentation
See also the Python documentation:
You should not be creating entity with ids that have not been allocated by the datastore, if you want to supply an user defined identifier as part of the Entity key, use
key_nameinstead.