I have a datastore object that uses one of the fields in the class to create the key. Suppose I have an object ‘a’ with a value ‘k’ for this field. If I try to add an object ‘b’ to the datastore, which also has value ‘k’ for the field, object ‘b’ overwrites object ‘a’. Just wanted to confirm if this is expected behaviour. While it looks quite obvious, it would be great if someone can explain the underlying concept..
Share
As Adam has explained, the short answer is that two entities can’t share the same key (imagine a dict). The long answer though, is a little bit more complex. See the docs: