I am joining two models without a foreign key:
Models:
class Users(db.Model):
__tablename__ = \"Users\"
userName = db.Column(db.String, primary_k
To improve upon @Matt Healy's answer, if you also want to be able to access attributes on the joined object you can do something like:
user, timeOff = db.session.query(Users, TimeOff).join(
TimeOff, Users.userName == TimeOff.userName
).first()
Then timeOff.dayWork
etc. will give the information you need.