| 2250 | bs = relationship("B", order_by="B.id", back_populates="a") |
| 2251 | |
| 2252 | class B(ComparableEntity, Base): |
| 2253 | __tablename__ = "b" |
| 2254 | id = Column(Integer, primary_key=True) |
| 2255 | a_id1 = Column() |
| 2256 | a_id2 = Column() |
| 2257 | |
| 2258 | a = relationship("A", back_populates="bs") |
| 2259 | |
| 2260 | __table_args__ = ( |
| 2261 | ForeignKeyConstraint(["a_id1", "a_id2"], ["a.id1", "a.id2"]), |
| 2262 | ) |
| 2263 | |
| 2264 | @classmethod |
| 2265 | def insert_data(cls, connection): |