Let's say I have a table 'user', and for backwards compatibility reasons I
have a single-column table named 'user_active' which is basically just a
foreign key used as a boolean flag. I need my User model to have the
'active' field as a boolean mapped to that one-to-one relationship. So, I
I'm sorry, forgot to include Message:
class Message(Base):
__tablename__ = messages
id = Column(Integer, primary_key=True)
type = Column(String)
sender_id = Column(Integer, ForeignKey(users.id))
recipient_association_id = Column(Integer,
ForeignKey(RecipientAssociation.id))