MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _lazyload_reverse

Method _lazyload_reverse

lib/sqlalchemy/orm/strategies.py:1106–1119  ·  view source on GitHub ↗
(compile_context)

Source from the content-addressed store, hash-verified

1104 stmt._order_by_clauses = self._order_by
1105
1106 def _lazyload_reverse(compile_context):
1107 for rev in self.parent_property._reverse_property:
1108 # reverse props that are MANYTOONE are loading *this*
1109 # object from get(), so don't need to eager out to those.
1110 if (
1111 rev.direction is interfaces.MANYTOONE
1112 and rev._use_get
1113 and not isinstance(rev.strategy, _LazyLoader)
1114 ):
1115 strategy_options.Load._construct_for_existing_path(
1116 compile_context.compile_options._current_path[
1117 rev.parent
1118 ]
1119 ).lazyload(rev).process_compile_state(compile_context)
1120
1121 stmt = stmt._add_compile_state_func(
1122 _lazyload_reverse, self.parent_property

Callers

nothing calls this directly

Calls 3

process_compile_stateMethod · 0.45
lazyloadMethod · 0.45

Tested by

no test coverage detected