Yeah, it's a bad idea.  On the dev app server the keys will increase nicely 
like that, but in production there's no guarantee that will happen.  In 
fact, I'm pretty sure it's guaranteed that they won't increase nicely.

I wrote a test the other day where I was creating models in a loop and the 
key_ids were all over the place.

If you want a persistant counter you should either use memcache's increment 
functionality (and periodically save the counter to the datastore), or look 
up the sharded counter sample implementation.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to