On Sun, Apr 12, 2009 at 19:21, Michael Bayer <mike...@zzzcomputing.com>wrote:

> use a seperate join() call for each path.   join(path1, path2, path3 ...)
> assumes thats one path along related entities.
>

Thanks! Just in case anyone interested, here is final (working) code:

            clauses = []
            if skill:
                q = q.join('profile', 'skills')
                clauses.append(Skill.name == skill)
            if city:
                q = q.join('profile', 'city')
                clauses.append(City.name == city)
            members = q.filter(and_(*clauses))


-- 
Max.Ischenko // twitter.com/maxua

--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to