MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / check_fk

Method check_fk

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

Source from the content-addressed store, hash-verified

2646
2647 def _annotate_from_fk_list(self) -> None:
2648 def check_fk(element: _CE, **kw: Any) -> Optional[_CE]:
2649 if element in self.consider_as_foreign_keys:
2650 return element._annotate({"foreign": True})
2651 return None
2652
2653 self.primaryjoin = visitors.replacement_traverse(
2654 self.primaryjoin, {}, check_fk

Callers

nothing calls this directly

Calls 1

_annotateMethod · 0.45

Tested by

no test coverage detected