1 Jul 2012 21:42
Query relationship in order
Diego <diego.no.spam <at> gmail.com>
2012-07-01 19:42:01 GMT
2012-07-01 19:42:01 GMT
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 received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/MUvsZ0Mgu78J.
To post to this group, send email to sqlalchemy <at> googlegroups.com.
To unsubscribe from this group, send email to sqlalchemy+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
RSS Feed