@_generative()
def _from_selectable(self, fromclause):
    for attr in ('_statement', '_criterion', '_order_by', '_group_by', '_limit', '_offset', '_joinpath', '_joinpoint', '_distinct', '_having', '_prefixes'):
        self.__dict__.pop(attr, None)
    self._set_select_from([fromclause], True)
    self._orm_only_from_obj_alias = False
    old_entities = self._entities
    self._entities = []
    for e in old_entities:
        e.adapt_to_selectable(self, self._from_obj[0])
@_generative()
def _from_selectable(self, fromclause):
    for attr in ('_statement', '_criterion', '_order_by', '_group_by', '_limit', '_offset', '_joinpath', '_joinpoint', '_distinct', '_having', '_prefixes'):
        self.__dict__.pop(attr, None)
    self._set_select_from([fromclause], True)
    self._orm_only_from_obj_alias = False
    old_entities = self._entities
    self._entities = []
    for e in old_entities:
        e.adapt_to_selectable(self, self._from_obj[0])