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