Try:
Entity.gql("WHERE __key__ > :1 ORDER BY __key__ ASC",
and
Entity.gql("WHERE __key__ > :1 ORDER BY __key__ DESC",One of the two should solve your problem. On Thu, May 13, 2010 at 8:23 AM, Alex Kirs <[email protected]> wrote: > The code Entity.gql("WHERE __key__ > :1 ORDER BY __key__", > db.Key(entity.last_key)).fetch(1000) > returns WRONG order (notice how after GP goes GI): > agdiYWR3aWtpcgsLEgRDbGlwGPoSDA > agdiYWR3aWtpcgsLEgRDbGlwGPsSDA > agdiYWR3aWtpcgsLEgRDbGlwGPwSDA > agdiYWR3aWtpcgsLEgRDbGlwGP0SDA > agdiYWR3aWtpcgsLEgRDbGlwGP4SDA > agdiYWR3aWtpcgsLEgRDbGlwGP8SDA > agdiYWR3aWtpcgsLEgRDbGlwGIATDA > agdiYWR3aWtpcgsLEgRDbGlwGIETDA > agdiYWR3aWtpcgsLEgRDbGlwGIITDA > agdiYWR3aWtpcgsLEgRDbGlwGIMTDA > agdiYWR3aWtpcgsLEgRDbGlwGIQTDA > agdiYWR3aWtpcgsLEgRDbGlwGIUTDA > agdiYWR3aWtpcgsLEgRDbGlwGIYTDA > agdiYWR3aWtpcgsLEgRDbGlwGIcTDA > > What can be the problem? > > -- > 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. > > -- Sincerely yours, Jawaad Mahmood http://www.jawaadmahmood.com 080-4204-7198 -- 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.
