[sqlalchemy] Re: How to order_by relation by another join?

2010-02-11 Thread Andrija Zarić
Thanks, Mike! Your example indeed works, but unfortunately when I add inheritance, mapper fails to generate proper (inherited) class: (I've changed code a little, so it represents more what I'm trying to do) from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative

Re: [sqlalchemy] Re: How to order_by relation by another join?

2010-02-11 Thread Michael Bayer
On Feb 11, 2010, at 6:45 AM, Andrija Zarić wrote: Thanks, Mike! Your example indeed works, but unfortunately when I add inheritance, mapper fails to generate proper (inherited) class: (I've changed code a little, so it represents more what I'm trying to do) class ValueItem(Item):

Re: [sqlalchemy] Re: How to order_by relation by another join?

2010-02-11 Thread Andrija Zarić
On 11 February 2010 14:26, Michael Bayer mike...@zzzcomputing.com wrote: I'm assuming these are single-table inheritance mappers (I forgot about that add the column trick..) So yeah my solution was a quick hack and to continue in this way you'd have to build non-primary mappers for each of