This is the code in web2py/gluon/contrib/gql.py
if orderby:
if isinstance(orderby, (list, tuple)):
orderby = gluon.sql.xorify(orderby)
assert_filter_fields(orderby)
if orderby.type == 'id':
orders = ['__key__']
else:
orders = orderby.name.split('|')
for order in orders:
items = items.order(order)
I think web2py handles it correctly. Either there is a problem on the
gae side or the indices have not been created.
On Nov 1, 7:04 am, MicLee <[email protected]> wrote:
> Is it possible to order by multiple fields on GAE?
>
> I tried this (both title and subtitle are strings):
> pages = db().select(db.page.ALL,orderby=db.page.title|
> db.page.subtitle)
>
> But apparently the results are ordered by the title field only.
>
> Looking into the index.yaml, there is NO composite index for those 2
> fields generated.
>
> Thank you.