In this example, I have 3 classes: Useraccount id name
Group id name Useraccount2Group id role_id useraccount_id group_id useraccount= relationship group= relationship With them, I'd like to do the following 2 things: Task A - Display a single table , which has all of the user's groups in alphabetical order. Task B - Display a different table for each unique "Useraccount2Group.role_id" , each table showing all the groups in alphabetical order. I'm running into a bit of a wall trying to think this out. I know i'll have to do a lot of mapping in Python, but I'd like to get some of the alphabetization (at least!) done in postgres. My last attempt had me querying Useraccount2Group with a joinedload('group') ( i needed it eagerloaded ), but then I couldn't figure out how to sort the data. trying to sort based on Group.name creates an error as the ORM isn't clear what it should sort on ( Group.name or group.name ). I'm also wondering if I should be querying for the Group instead. -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.