(self)
| 591 | pass |
| 592 | |
| 593 | def test_cycle(self): |
| 594 | C2, C1, t2, t1 = ( |
| 595 | self.classes.C2, |
| 596 | self.classes.C1, |
| 597 | self.tables.t2, |
| 598 | self.tables.t1, |
| 599 | ) |
| 600 | |
| 601 | self.mapper_registry.map_imperatively( |
| 602 | C2, |
| 603 | t2, |
| 604 | properties={ |
| 605 | "c1s": relationship( |
| 606 | C1, primaryjoin=t2.c.c1 == t1.c.c2, uselist=True |
| 607 | ) |
| 608 | }, |
| 609 | ) |
| 610 | self.mapper_registry.map_imperatively( |
| 611 | C1, |
| 612 | t1, |
| 613 | properties={ |
| 614 | "c2s": relationship( |
| 615 | C2, primaryjoin=t1.c.c1 == t2.c.c2, uselist=True |
| 616 | ) |
| 617 | }, |
| 618 | ) |
| 619 | |
| 620 | a = C1() |
| 621 | b = C2() |
| 622 | c = C1() |
| 623 | d = C2() |
| 624 | e = C2() |
| 625 | f = C2() |
| 626 | a.c2s.append(b) |
| 627 | d.c1s.append(c) |
| 628 | b.c1s.append(c) |
| 629 | sess = fixture_session() |
| 630 | sess.add_all((a, b, c, d, e, f)) |
| 631 | sess.flush() |
| 632 | |
| 633 | |
| 634 | class BiDirectionalOneToManyTest2(fixtures.MappedTest): |
nothing calls this directly
no test coverage detected