On Jan 11, 2009, at 11:06 AM, Christoph Zwerschke wrote:
> > Michael Bayer schrieb: >> As far as implicit tablename, it breaks the single inheritance >> scenario. but also besides that I made a comment on that here: >> >> http://www.sqlalchemy.org/trac/ticket/1270#comment:2 > > Thanks, I hadn't seen that. Not quite sure what you mean with single > inheritance scenario, though. if Bar inherits from Foo, Foo is mapped to "foo_table", Bar has no table, Bar will be mapped to foo_table as well. >> Very simple, the former: > > session.query(Foo).order_by(-2) > > should work the same as > > from sqlalchemy import desc > session.query(Foo).order_by(desc(2)) > > The idea is that it's somewhat shorter and intuitive since for names > of > numerical columns, you also get reverse order if you add a minus sign. oh, this is entirely news to me that you can send column positions to ORDER BY. SQLA has no awareness of that concept right now. seems like "more than one way to do it" at the moment...(i.e. order by columns *or* position, times use desc or negation == 4 ways). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---