(
self, compile_state, entity, entities_collection, is_current_entities
)
| 2836 | _label_name: str |
| 2837 | |
| 2838 | def __init__( |
| 2839 | self, compile_state, entity, entities_collection, is_current_entities |
| 2840 | ): |
| 2841 | entities_collection.append(self) |
| 2842 | if is_current_entities: |
| 2843 | if compile_state._primary_entity is None: |
| 2844 | compile_state._primary_entity = self |
| 2845 | compile_state._has_mapper_entities = True |
| 2846 | compile_state._has_orm_entities = True |
| 2847 | |
| 2848 | entity = entity._annotations["parententity"] |
| 2849 | entity._post_inspect |
| 2850 | ext_info = self.entity_zero = entity |
| 2851 | entity = ext_info.entity |
| 2852 | |
| 2853 | self.expr = entity |
| 2854 | self.mapper = mapper = ext_info.mapper |
| 2855 | |
| 2856 | self._extra_entities = (self.expr,) |
| 2857 | |
| 2858 | if ext_info.is_aliased_class: |
| 2859 | self._label_name = ext_info.name |
| 2860 | else: |
| 2861 | self._label_name = mapper.class_.__name__ |
| 2862 | |
| 2863 | self.is_aliased_class = ext_info.is_aliased_class |
| 2864 | self.path = ext_info._path_registry |
| 2865 | |
| 2866 | self.selectable = ext_info.selectable |
| 2867 | self._with_polymorphic_mappers = ext_info.with_polymorphic_mappers |
| 2868 | self._polymorphic_discriminator = ext_info.polymorphic_on |
| 2869 | |
| 2870 | if mapper._should_select_with_poly_adapter: |
| 2871 | compile_state._create_with_polymorphic_adapter( |
| 2872 | ext_info, self.selectable |
| 2873 | ) |
| 2874 | |
| 2875 | supports_single_entity = True |
| 2876 |
nothing calls this directly
no test coverage detected