I didn't get it to work, so I created a workaround:
Two additional fields linked to the next or previous key name.
These links are updated by for loop over the sequence.
If I get more pictures or I have to be more dynamic with the sequence
I have to add some more logic to keep the links updated
with a single operation instead of a big loop.
Grace to the initial concern it's a poor workaround.

On 2 Apr., 20:39, OliWeiD <[email protected]> wrote:
> Hi Jeff,
>
> Example: I'm looking at picture 1, so I pass 1 to img_next.
> I want to have the next sequence > 1 (e.g. 2)
> and of cause it's ordered ascending.
>
> As long as the filter "sequence > " or "sequence < " is in,
> the result is empty.
>
> Hope that answers your questions.
>
> Thank you
>
> OliWeiD.
>
> On 2 Apr., 19:05, Jeff S <[email protected]> wrote:
>
>
>
> > Hi OliWeiD,
>
> > The > in your filter looks a bit suspicious. The default ordering
> > direction is ascending, and since you order on sequence ascending,
> > should the inequality be <? I'm not sure what img_next signifies.
>
> > Thank you,
>
> > Jeff
>
> > On Apr 1, 10:44 am, OliWeiD <[email protected]>
> > wrote:
>
> > > The following query is not working normal:
> > >             q = Photo.all().filter('viewer = ', True) \
> > >                     .filter('sequence > ', img_next) \
> > >                     .order('sequence').order('__key__')
> > > the query is returning nothing,
> > > but when the filter(sequence >) is not in, the first image is
> > > retrieved.
> > > Thanks in advance for any hint..OliWeiD- Zitierten Text ausblenden -
>
> > - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
--~--~---------~--~----~------------~-------~--~----~
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