SQLObject ordering

Kevin Dahlhausen kdahlhaus at yahoo.com
Thu Feb 26 01:52:23 EST 2004


As much as I liked Middlekit, SQLObject is my new favorite.  It's just
so clean.  I haven't been able to figure out how to order the results
of a select by an attribute that is another SQLObject (Foreign Key):

class Car:
    manufacturer = ForeignKey("Manufacturer")


class Manufacturer:
    name = StringCol()


I'd like to run a select on Car and have the results return sorted by
Manufacturer name.  Normally, it would just be a matter of passing the
attribute name into the select statement as an orderBy keyword, but
foreign keys work differently.

Does anybody know how to do this?



More information about the Python-list mailing list