It's not possible, you will need to de-normalise your data model. Also, it's not possible to define indices on a TextProperty, use a StringProperty instead.
On Dec 2, 8:50 am, sarp <[EMAIL PROTECTED]> wrote: > Is it possible to order by a property belonging to a reference > property in GQL queries? > > For example: > class Employee(db.Model): > belongsto = db.ReferenceProperty(Company) > > class Company(db.Model): > name = db.TextProperty() > > I want to do > db.GqlQuery("SELECT * FROM Employee ORDER BY belongsto.name") > > Thanks, > Sarp --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---