How do I return results from both tables in a SQLAlchemy JOIN?
问题 I have two tables defined in my ORM as: Base = declarative_base() class GeneralLedger(Base): __tablename__ = 'generalledgers' id = Column(Integer, primary_key=True) invoiceId = Column(Integer) .. class ConsolidatedLedger(Base): __tablename__ = 'consolidatedledgers' id = Column(Integer, primary_key = True) invoiceId = Column(Integer) .. I don't have any relationship set between the two tables. I do a join as follows: records = DBSession.query(GeneralLedger).join(ConsolidatedLedger,