Hi everyone,

I have a beginner's question I wasn't able to find documentation on.
I'd be grateful if someone could point me to a specific page or issue
number that discusses it.

I just finished debugging a simple pager that pages over a PolyModel
subclass using the __key__ in descending order.  It works on the
development server but not in production, where an unspecified
exception is thrown (nothing appears in the log).  Here is the
offending line:

        result = self.model.all().order('-__key__').fetch
(self.pagesize + 1)

The application works in production with the following modified
version of the line:

        result = self.model.all().fetch(self.pagesize + 1)

One approach I've tried as a workaround is to order by an "added"
timestamp property in the PolyModel base class, which results in an
exception as well.  Another thing I've tried is to manually add the
following index to index.yaml, which wasn't being created
automatically by the development server (I assume it's not necessary):

- kind: QuestionGroup
  properties:
  - name: __key__
    direction: desc

Adding this definition didn't fix the problem either.

I understand that there was a similar ordering issue that was
addressed in http://code.google.com/p/googleappengine/issues/detail?id=884.
According to a comment, the problem was fixed in 1.1.8 (I'm using
1.2.0).

Please let me know if I've left something important out.

In a different connection, the pager turned out to be pretty finicky
to debug, as I wanted both a "next" and "back" link, and I
unintentionally introduced a lot of off-by-one errors.  Has been
logged for a feature request for paging that I can follow?  I assume
this is something that most projects will need at some point.

Many thanks in advance for any help,
Eric

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

Reply via email to