Re: [sqlalchemy] Query relationship in order

2012-07-03 Thread Michael Bayer
this is approached using joins as described in the ORM tutorial at http://docs.sqlalchemy.org/en/rel_0_7/orm/tutorial.html#querying-with-joins . If you'd like to present a specific A to Query without filtering for A rows, you can use with_parent(), see the last example in http://docs.sqlalchemy

[sqlalchemy] Query relationship in order

2012-07-01 Thread Diego
Hi, Say I have two entities A and B, that have a many to many relationship between them. Now I'd like to get all Bs from a given A, ordered by some attribute of B. Something like select B from A order by B.attr desc How do I express that query using the ORM? Thanks in advance, Diego -- You