| 2570 | """ |
| 2571 | |
| 2572 | class A(decl_base): |
| 2573 | __tablename__ = "a" |
| 2574 | |
| 2575 | id = Column(Integer, primary_key=True) |
| 2576 | data = Column(String) |
| 2577 | |
| 2578 | if remote_anno_type == "annotation": |
| 2579 | if use_col_from == "core_col": |
| 2580 | bs = relationship( |
| 2581 | "B", |
| 2582 | primaryjoin=lambda: remote(A.__table__.c.id) |
| 2583 | == B.__table__.c.a_id, |
| 2584 | ) |
| 2585 | elif use_col_from == "orm_col": |
| 2586 | bs = relationship( |
| 2587 | "B", primaryjoin="remote(A.id) == B.a_id" |
| 2588 | ) |
| 2589 | elif remote_anno_type == "local_remote": |
| 2590 | if use_col_from == "core_col": |
| 2591 | bs = relationship( |
| 2592 | "B", remote_side=lambda: A.__table__.c.id |
| 2593 | ) |
| 2594 | elif use_col_from == "orm_col": |
| 2595 | bs = relationship("B", remote_side="A.id") |
| 2596 | |
| 2597 | class B(decl_base): |
| 2598 | __tablename__ = "b" |
nothing calls this directly
no test coverage detected