[sqlalchemy] Re: self referential query with order_by

2008-02-11 Thread David Gardner
Thank you this worked for me. You can put the child order by at the end using reset_joinpoint(): grandchildren = session.query(Node).filter(Node.c.type==var1).\ join('Parent', aliased=True).filter(Node.c.type==var2).\ order_by(Node.name).\ join('Parent',aliased=True,from_joinpoint=True).\

[sqlalchemy] Re: self referential query with order_by

2008-02-11 Thread Michael Bayer
yup that seems to be the case, was fixed in 0.4.2. On Feb 11, 2008, at 8:01 PM, David Gardner wrote: Well sort of... This worked on my local development box (0.4.2p3), but my server is still on 0.4.0 and the data is sorted by grandchild only. I am assuming this is expected and I just need

[sqlalchemy] Re: self referential query with order_by

2008-02-11 Thread David Gardner
Well sort of... This worked on my local development box (0.4.2p3), but my server is still on 0.4.0 and the data is sorted by grandchild only. I am assuming this is expected and I just need to upgrade my server to get this working? David Gardner wrote: Thank you this worked for me. You