I am using AppEngine with the HR Datastore and my Objects have IDs of type Long (using Java). I do not set the ID myself but let the Datastore choose a new unique one. So far I have only seen positive IDs generated.
Does AppEngine also assign negative IDs ever? (assuming that I do not request more than 2^63 IDs of course ;-))
The answer seems to be: MAYBE.
In my tests I have only seen positive auto generated IDs, but I was able to store negative IDs (if manually assigned). Until someone can point us to a specification that defines otherwise or at least some Googler from the AppEngine team speaks up, we must assume that they at least reserve the right to generate negative IDs at any time. Thus our code cannot assume generated IDs to be positive always.