Reputation: 53
class Entries(ndb.Model):
description = ndb.StringProperty()
seqid = ndb.IntegerProperty()
link = ndb.StringProperty()
group = ndb.StringProperty()
timestamp = ndb.StringProperty()
referrals = ndb.StringProperty(repeated=True)
The two entries in the picture are created by two different users. The user is the parent of the Entry.
I get a duplicate ID on production but not on local. Also, it's always this same id number (but it is certainly not hard coded anywhere)
As the parent is the user, i can still pull it as a unique entry but it will mean there will be problems if I have two entries with the same parent user.
Upvotes: 3
Views: 744
Reputation: 101139
A datastore's unique key is the fully qualified key, including all parent entity keys, not just the ID. Multiple entities with the same ID and different parents are completely valid, and you shouldn't rely on the id alone being unique.
Upvotes: 7