I am joining two models without a foreign key:
Models:
class Users(db.Model):
__tablename__ = \"Users\"
userName = db.Column(db.String, primary_k
This worked for me, I have 3 tables, And I have the rtf_id which is unique to all three tables, you have to use the select_from keyword which tells the table starting from left.
db_data = dbobj.session.query(A, B, C). \
select_from(A).join(B, B.rtf_id == A.rtf_id). \
join(C, C.rtf_id == A.rtf_id).all()