On Feb 24, 2010, at 10:21 AM, Affect wrote:

> This works great! Thanks, Michael.
> 
> In a related note, I was wondering why I wasn't able to make this
> explicit workaround myself. It is because I don't understand the SA
> abstractions well enough. I hope that your upcoming book helps in this
> regard (SQLAlchemy: Database Access Using Python). It's too bad that
> it's not gonna be here until November.

I wouldn't wait for the book.  the varieties of onclause are in the online docs:

http://www.sqlalchemy.org/docs/ormtutorial.html#querying-with-joins



> 
> Cheers,
> Ahmed
> 
> 
> On Feb 23, 5:57 pm, Michael Bayer <[email protected]> wrote:
>> On Feb 23, 2010, at 4:45 PM, Affect wrote:
>> 
>>>    work1 = aliased(Work)
>>>    work2 = aliased(Work)
>>>    query = session.query(work1).outerjoin((work2, work1.parent))
>>>    query = query.outerjoin((Owner, work1.owner))
>> 
>> bug confirmed, this is ticket #1706.
>> 
>> for now workaround explicitly:
>> 
>> query = query.outerjoin((Owner, work1.owner_id==Owner.id))
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> 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.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
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.

Reply via email to