MCPcopy
hub / github.com/pallets-eco/flask-sqlalchemy / relationship

Method relationship

src/flask_sqlalchemy/extension.py:953–963  ·  view source on GitHub ↗

A :func:`sqlalchemy.orm.relationship` that applies this extension's :attr:`Query` class for dynamic relationships and backrefs. .. versionchanged:: 3.0 The :attr:`Query` class is set on ``backref``.

(
        self, *args: t.Any, **kwargs: t.Any
    )

Source from the content-addressed store, hash-verified

951 backref[1].setdefault("query_class", self.Query)
952
953 def relationship(
954 self, *args: t.Any, **kwargs: t.Any
955 ) -> sa_orm.RelationshipProperty[t.Any]:
956 """A :func:`sqlalchemy.orm.relationship` that applies this extension's
957 :attr:`Query` class for dynamic relationships and backrefs.
958
959 .. versionchanged:: 3.0
960 The :attr:`Query` class is set on ``backref``.
961 """
962 self._set_rel_query(kwargs)
963 return sa_orm.relationship(*args, **kwargs)
964
965 def dynamic_loader(
966 self, argument: t.Any, **kwargs: t.Any

Callers 3

TodoClass · 0.95
ParentClass · 0.95
ChildClass · 0.95

Calls 1

_set_rel_queryMethod · 0.95

Tested by

no test coverage detected