[sqlalchemy] How to select questions which have no answers

2010-09-01 Thread Freewind
I've two classes: Question and Answer. A question may have 0 or many answers. class Question(Base): __tablename__ = questions answers = relationship('Answer', backref='question', primaryjoin=Question.id==Answer.question_id) class Answer(Base): __tablename__ = answers Now I want to

Re: [sqlalchemy] How to select questions which have no answers

2010-09-01 Thread Michael Bayer
On Sep 1, 2010, at 5:15 AM, Freewind wrote: I've two classes: Question and Answer. A question may have 0 or many answers. class Question(Base): __tablename__ = questions answers = relationship('Answer', backref='question', primaryjoin=Question.id==Answer.question_id) class