| 1551 | self.states[state] = overwrite |
| 1552 | |
| 1553 | def invoke(self, context, path): |
| 1554 | if not self.states: |
| 1555 | return |
| 1556 | path = path_registry.PathRegistry.coerce(path) |
| 1557 | for ( |
| 1558 | effective_context, |
| 1559 | token, |
| 1560 | limit_to_mapper, |
| 1561 | loader, |
| 1562 | arg, |
| 1563 | kw, |
| 1564 | ) in self.loaders.values(): |
| 1565 | states = [ |
| 1566 | (state, overwrite) |
| 1567 | for state, overwrite in self.states.items() |
| 1568 | if state.manager.mapper.isa(limit_to_mapper) |
| 1569 | ] |
| 1570 | if states: |
| 1571 | loader( |
| 1572 | effective_context, path, states, self.load_keys, *arg, **kw |
| 1573 | ) |
| 1574 | self.states.clear() |
| 1575 | |
| 1576 | @classmethod |
| 1577 | def for_context(cls, context, path, only_load_props): |