Run init_instance hooks. This also includes mapper compilation, normally not needed here but helps with some piecemeal configuration scenarios (such as in the ORM tutorial).
(state, args, kwargs)
| 4407 | |
| 4408 | |
| 4409 | def _event_on_init(state, args, kwargs): |
| 4410 | """Run init_instance hooks. |
| 4411 | |
| 4412 | This also includes mapper compilation, normally not needed |
| 4413 | here but helps with some piecemeal configuration |
| 4414 | scenarios (such as in the ORM tutorial). |
| 4415 | |
| 4416 | """ |
| 4417 | |
| 4418 | instrumenting_mapper = state.manager.mapper |
| 4419 | if instrumenting_mapper: |
| 4420 | instrumenting_mapper._check_configure() |
| 4421 | if instrumenting_mapper._set_polymorphic_identity: |
| 4422 | instrumenting_mapper._set_polymorphic_identity(state) |
| 4423 | |
| 4424 | |
| 4425 | class _ColumnMapping(Dict["ColumnElement[Any]", "MapperProperty[Any]"]): |
nothing calls this directly
no test coverage detected