Есть следующая ORM:
class ORM_Test(Base):
tablename = 'orm_test'
id = Column(Integer, primary_key=True)
# FIXME: one-to-many with ORM_Base
client = relationship(
"ORM_Base",
backref='client',
lazy='dynamic',
cascade="all,delete"
)
# FIXME: one-to-many with ORM_Base
server = relationship(
"ORM_Base",
backref='server',
lazy='dynamic',
cascade="all,delete"
)
и сам ORM_Base:
class ORM_Base(Base):
tablename = 'orm_base'
id = Column(Integer, primary_key=True)
client_id = Column(Integer, ForeignKey('orm_test.id'))
server_id = Column(Integer, ForeignKey('orm_test.id'))
При работе с данными ORM-мами выскакивает
there are multiple foreign key paths linking the tables. Specify the 'foreign_keys' argument, providing a list of those columns which should be counted as containing a foreign key reference to the parent table.
Я так понимю, надо аргумент foreign_keys прописать ORM_Base в каждый из ForeignKey?