| 357 | return None |
| 358 | |
| 359 | def _only_full_mapper_zero(self, methname: str) -> Mapper[Any]: |
| 360 | if ( |
| 361 | len(self._raw_columns) != 1 |
| 362 | or "parententity" not in self._raw_columns[0]._annotations |
| 363 | or not self._raw_columns[0].is_selectable |
| 364 | ): |
| 365 | raise sa_exc.InvalidRequestError( |
| 366 | "%s() can only be used against " |
| 367 | "a single mapped class." % methname |
| 368 | ) |
| 369 | |
| 370 | return self._raw_columns[0]._annotations["parententity"] # type: ignore # noqa: E501 |
| 371 | |
| 372 | def _set_select_from( |
| 373 | self, obj: Iterable[_FromClauseArgument], set_base_alias: bool |