sqlalchemy foreign key relationship attributes
问题 I have a User table and a Friend table. The Friend table holds two foreign keys both to my User table as well as a status field. I am trying to be able to call attributes from my User table on a Friend object. For example, I would love to be able to do something like, friend.name, or friend.email. class User(Base): """ Holds user info """ __tablename__ = 'user' id = Column(Integer, primary_key=True) name = Column(String(25), unique=True) email = Column(String(50), unique=True) password =