Re: [sqlalchemy] Aliased element and attributes

2012-06-29 Thread Michael Bayer
On Jun 29, 2012, at 9:58 AM, tonthon wrote: > Hi, > > I'm using the following (as discussed in another post) : > > p1 = aliased(Project) > > when using it in a filter : > > query = session.query(Task).with_polymorphic([Invoice, > Estimation]).outerjoin(p1, Invoice.project).outerjoin(p2, > Est

[sqlalchemy] Aliased element and attributes

2012-06-29 Thread tonthon
Hi, I'm using the following (as discussed in another post) : p1 = aliased(Project) when using it in a filter : query = session.query(Task).with_polymorphic([Invoice, Estimation]).outerjoin(p1, Invoice.project).outerjoin(p2, Estimation.project) query = query.filter(p1.company_id==cid) I get the