Alexandre Conrad wrote:
> Here is the code I'm working on (sqlite and mysql errors at the bottom):
> 
> http://rafb.net/p/HlZw3P26.html
> 
> Here are the relations for clarity:
> 
> client(company) -- one-to-many -< site(company)
> client(company) -- one-to-many -< channel(object)
> 
> query == site -> client -> channels

Got it, I had to add 'aliased=True' to make the query happend.

print session.query(Channel).join(["client", "sites"], 
aliased=True).filter(Site.c.id==2).all()

Regards,
-- 
Alexandre CONRAD


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to