usually thats what people want for this particular question, since they want all the behavior to be abstracted through their relation()s. but since you have some actual SQL youd like, here goes:
straight select s = select([forum_topic], forum_topic.c.id==forum_post.c.topic_id, group_by=[forum_topic.c.id], order_by=[desc(forum_post.c.created)]) through the ORM: session.query(ForumTopic).select(forum_topic.c.id==forum_post.c.topic_id, group_by=[forum_topic.c.id], order_by=[desc(forum_post.c.created)]) if the GROUP BY doesnt work with the Query since i havent tested that it gets propigated through to the generated query lately, you can feed the full select into the query too: result = session.query(ForumTopic).select(s) or feed in its results: result = session.query(ForumTopic).instances(s.execute()) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
