It seems I don't understand how i can order the results of a query. Assume that i have two object Story and StoryStats. Each Story has one StoryStats, mapped by ForeignKey. The relation is eagerloaded (lazy=False) (The actual model is a tad more complicated, but the idea is the same)
When i now try to select Stories, ordering by create_date goes fine, e.g. session.query(Story).order_by(Story.c.create_date) But ordering by the realated StoryStats goes awry :/ session.query(Story).order_by(StoryStats.c.rating), only a singe Story is returned and the actual query takes rather long, about a second. Now errors are thrown however. Is there something I'm missing here? (I know I probably could do session.query(StoryStats).order_by(StoryStats.c.rating), but that kind of defeats the purpose as the ordering is dynamic) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---