Datastore Key IDs

4 views
Skip to first unread message

ae

unread,
Oct 1, 2008, 12:31:21 PM10/1/08
to Google App Engine
Hi,

just wondering, do the datastore key ids get recycled for an entity?
or are they guaranteed to by unique for an entity? e.g. if key id 7
to 10 gets deleted, do those key id ever get used again?

Thanks

theo

unread,
Oct 1, 2008, 9:56:13 PM10/1/08
to Google App Engine
They are supposed to be unique. I have managed to make duplicate id's
though. Keys are always unique, as far as I can tell.

ryan

unread,
Oct 2, 2008, 8:11:32 PM10/2/08
to Google App Engine
theo is right: only entire keys (ie paths) are guaranteed to be
unique. more:

http://code.google.com/appengine/docs/datastore/keysandentitygroups.html#Entity_Groups_Ancestors_and_Paths

one corollary to this is that ids (and key names) are guaranteed to be
unique within all entities of a given kind with the same parent.
similarly, ids and key names will be unique within all root entities
of a given kind.
Reply all
Reply to author
Forward
0 new messages