MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / A

Class A

examples/association/dict_of_sets_with_default.py:43–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42
43class A(Base):
44 __tablename__ = "a"
45 associations: Mapped[Mapping[str, B]] = relationship(
46 "B",
47 collection_class=lambda: GenDefaultCollection(
48 operator.attrgetter("key")
49 ),
50 )
51
52 collections: AssociationProxy[dict[str, set[int]]] = association_proxy(
53 "associations", "values"
54 )
55 """Bridge the association from 'associations' over to the 'values'
56 association proxy of B.
57 """
58
59
60class B(Base):

Callers 1

Calls 3

relationshipFunction · 0.90
association_proxyFunction · 0.90

Tested by

no test coverage detected