def setup_entity(self, ext_info, aliased_adapter):
    self.mapper = ext_info.mapper
    self.aliased_adapter = aliased_adapter
    self.selectable = ext_info.selectable
    self.is_aliased_class = ext_info.is_aliased_class
    self._with_polymorphic = ext_info.with_polymorphic_mappers
    self._polymorphic_discriminator = ext_info.polymorphic_on
    self.entity_zero = ext_info
    if ext_info.is_aliased_class:
        self._label_name = self.entity_zero.name
    else:
        self._label_name = self.mapper.class_.__name__
    self.path = self.entity_zero._path_registry
def setup_entity(self, ext_info, aliased_adapter):
    self.mapper = ext_info.mapper
    self.aliased_adapter = aliased_adapter
    self.selectable = ext_info.selectable
    self.is_aliased_class = ext_info.is_aliased_class
    self._with_polymorphic = ext_info.with_polymorphic_mappers
    self._polymorphic_discriminator = ext_info.polymorphic_on
    self.entity_zero = ext_info
    if ext_info.is_aliased_class:
        self._label_name = self.entity_zero.name
    else:
        self._label_name = self.mapper.class_.__name__
    self.path = self.entity_zero._path_registry