So, I have three tables:
The class defenitions:
engine = create_engine(\'sqlite://test.db\', echo=False) SQLSession = sessionmaker(bind=engine) Base = de
Don't query from the user. Query from the Channel.
user = query(User).filter_by(id=1).one() for channel in query(Channel).all(): print channel.id, channel.title, user in channel.subscriptions.user
That way you get all the channels, not just the ones that are associated with the user in question.