Using SQLAlchemy 0.7.1 and a MySQL 5.1 database, I\'ve got a many-to-many relationship set up as follows:
user_groups = Table(\'user_groups\', Base.metadata,
You can use in_:
in_
session.query(ZKUser).filter(ZKGroup.id.in_([1,2])).all()