I've got a 'system' table which has a foreign key client_id to a
'client' table, and that has a FK vendor_id to a 'vendor' table. 

Currently I query and order by client_id and system attribute like::

   systems = self.session.query(System).select(or_(System.c.lastseen == None,
                                                   System.c.lastseen < lately),
                                               
order_by=[System.c.client_id,System.c.lastseen])

then using SQLAlchemy magic I can render the system.client.vendor.name
and system.client.name.

I want to do a query on 'system', get and order by vendor.name and
client.name in that order.  But I don't know how to construct a join
so I can order this way. 

Any clues?  Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to