MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _post_configure_properties

Method _post_configure_properties

lib/sqlalchemy/orm/mapper.py:2340–2361  ·  view source on GitHub ↗

Call the ``init()`` method on all ``MapperProperties`` attached to this mapper. This is a deferred configuration step which is intended to execute once all mappers have been constructed.

(self)

Source from the content-addressed store, hash-verified

2338 _configure_registries({self.registry}, cascade=True)
2339
2340 def _post_configure_properties(self) -> None:
2341 """Call the ``init()`` method on all ``MapperProperties``
2342 attached to this mapper.
2343
2344 This is a deferred configuration step which is intended
2345 to execute once all mappers have been constructed.
2346
2347 """
2348
2349 self._log("_post_configure_properties() started")
2350 l = [(key, prop) for key, prop in self._props.items()]
2351 for key, prop in l:
2352 self._log("initialize prop %s", key)
2353
2354 if prop.parent is self and not prop._configure_started:
2355 prop.init()
2356
2357 if prop._configure_finished:
2358 prop.post_instrument_class(self)
2359
2360 self._log("_post_configure_properties() complete")
2361 self.configured = True
2362
2363 def add_properties(self, dict_of_properties):
2364 """Add the given dictionary of properties to this mapper,

Callers 1

_do_configure_registriesFunction · 0.80

Calls 4

_logMethod · 0.95
itemsMethod · 0.45
initMethod · 0.45
post_instrument_classMethod · 0.45

Tested by

no test coverage detected