on-internet
← Community

sqlalchemy: how to join several tables by one query?

Stack Overflow ·

I have the following SQLAlchemy mapped classes: class User(Base): __tablename__ = 'users' email = Column(String, primary_key=True) name = Column(String) class Document(Base): __tablename__ = "documents" name = Column(String, primary_key=True) author = Column(String, ForeignKey("users.email")) class DocumentsPermissions(Base): __tablename__ = "documents_permissions" readAllowed = Column(Boolean) writeAllowed = Column(Boolean) document = Column(String, ForeignKey("documents.name")) I need to get a table like this for user.email = "[email protected]": email | name | document_name | document_readAllo

Comments

Sign in or sign up to comment and upvote.

No comments yet.