remote_api documentation's example, batching on __key__ without ordering?

1 view
Skip to first unread message

Simo Salminen

unread,
Mar 13, 2009, 11:37:23 PM3/13/09
to Google App Engine
Hi.

In http://code.google.com/appengine/articles/remote_api.html there is
example:

entities = MyModel.all().fetch(100)
while entities:
for entity in entities:
# Do something with entity
entities = MyModel.all().filter('__key__ >', entities[-1].key
()).fetch(100)


How come there is no ordering on __key__?

Dan Sanderson

unread,
Mar 16, 2009, 1:22:39 PM3/16/09
to google-a...@googlegroups.com
__key__ is the default ordering when no other filters or sort orders are requested.  (In general, __key__ is the last ordering applied after all other orders.)

-- Dan
Reply all
Reply to author
Forward
0 new messages