I’ve looked all over the SQLAlchemy tutorial and other similar questions but I seem to be struggling to get this join to work:
The scenario: I have
Try foreign_keys option:
foreign_keys
publish_user = relationship(User, foreign_keys=publishing_user_id, primaryjoin=publishing_user_id == User.id, backref=backref('pages', order_by=id)) edit_user = relationship(User, foreign_keys=last_edit_user_id, primaryjoin=last_edit_user_id == User.id)