(element: _CE, **kw: Any)
| 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_ |