On 20 Aug 2012, at 7:20 AM, JungHyun Kim <kjungh...@gmail.com> wrote: > I have question about order by option with GAE. > This code works well on my local (not GAE test server), but has problem on > google app engine. (even on the GAE local test server) > > I filtered messages which has end_time after now, and tried to sort them by > reg_time. > > messages = db(db.mibmessage.end_time >= > datetime.now()).select(orderby=~db.mibmessage.reg_time) > > But there was an internal error. > > <class 'google.appengine.api.datastore_errors.BadArgumentError'> First > ordering property must be the same as inequality filter property, if > specified for this query; received reg_time, expected end_time > > Is it GAE's limitation?
Yes, a limitation of how they implement their SQL wrapper, apparently. > > Should I sort them by myself ? > I think you're stuck with it, yes. --