(self)
| 746 | ) |
| 747 | |
| 748 | def test_wp_joins(self): |
| 749 | Company, Person, Manager, Engineer, Boss = self.classes( |
| 750 | "Company", "Person", "Manager", "Engineer", "Boss" |
| 751 | ) |
| 752 | |
| 753 | def one(): |
| 754 | return ( |
| 755 | fixture_session() |
| 756 | .query(Company) |
| 757 | .join(Company.employees) |
| 758 | .filter(Person.name == "asdf") |
| 759 | ) |
| 760 | |
| 761 | def two(): |
| 762 | wp = with_polymorphic(Person, [Manager, Engineer]) |
| 763 | return ( |
| 764 | fixture_session() |
| 765 | .query(Company) |
| 766 | .join(Company.employees.of_type(wp)) |
| 767 | .filter(wp.name == "asdf") |
| 768 | ) |
| 769 | |
| 770 | def three(): |
| 771 | wp = with_polymorphic(Person, [Manager, Engineer]) |
| 772 | return ( |
| 773 | fixture_session() |
| 774 | .query(Company) |
| 775 | .join(Company.employees.of_type(wp)) |
| 776 | .filter(wp.Engineer.name == "asdf") |
| 777 | ) |
| 778 | |
| 779 | self._run_cache_key_fixture( |
| 780 | lambda: stmt_20(one(), two(), three()), |
| 781 | compare_values=True, |
| 782 | ) |
| 783 | |
| 784 | @testing.variation( |
| 785 | "exprtype", ["plain_column", "self_standing_case", "case_w_columns"] |
nothing calls this directly
no test coverage detected