[sqlalchemy] Re: filtering eagerloaded properties?

2009-08-13 Thread Ants Aasma
There are two reasonable options for this, one is to select tuples of group, user, task and join them together with appropriate conditions: session.query(Group, User, Task).outerjoin(Group.users).outerjoin ((Task, (Task.user_id == User.id) ~Task.complete)) the other option is to create a new

[sqlalchemy] Re: filtering eagerloaded properties?

2009-08-13 Thread Michael Bayer
use query.join(). its in the ORM tutorial. Sean wrote: I have a relatively, (at least I think), straightforward question that I've been having a difficult time tracking down an answer to. I have Groups that have Users that have Tasks and I want to write one query that gives me the group's