return a MapperProperty associated with the given key.
(
self, key: str, _configure_mappers: bool = False
)
| 2521 | return key in self._props |
| 2522 | |
| 2523 | def get_property( |
| 2524 | self, key: str, _configure_mappers: bool = False |
| 2525 | ) -> MapperProperty[Any]: |
| 2526 | """return a MapperProperty associated with the given key.""" |
| 2527 | |
| 2528 | if _configure_mappers: |
| 2529 | self._check_configure() |
| 2530 | |
| 2531 | try: |
| 2532 | return self._props[key] |
| 2533 | except KeyError as err: |
| 2534 | raise sa_exc.InvalidRequestError( |
| 2535 | f"Mapper '{self}' has no property '{key}'. If this property " |
| 2536 | "was indicated from other mappers or configure events, ensure " |
| 2537 | "registry.configure() has been called." |
| 2538 | ) from err |
| 2539 | |
| 2540 | def get_property_by_column( |
| 2541 | self, column: ColumnElement[_T] |