MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / parentmappers_

Method parentmappers_

lib/sqlalchemy/orm/relationships.py:2952–2957  ·  view source on GitHub ↗
(element: _CE, **kw: Any)

Source from the content-addressed store, hash-verified

2950
2951 def _annotate_parentmapper(self) -> None:
2952 def parentmappers_(element: _CE, **kw: Any) -> Optional[_CE]:
2953 if "remote" in element._annotations:
2954 return element._annotate({"parentmapper": self.prop.mapper})
2955 elif "local" in element._annotations:
2956 return element._annotate({"parentmapper": self.prop.parent})
2957 return None
2958
2959 self.primaryjoin = visitors.replacement_traverse(
2960 self.primaryjoin, {}, parentmappers_

Callers

nothing calls this directly

Calls 1

_annotateMethod · 0.45

Tested by

no test coverage detected