MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / User

Class User

test/typing/plain_files/orm/traditional_relationship.py:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28
29class User(Base):
30 __tablename__ = "user"
31
32 id = mapped_column(Integer, primary_key=True)
33 name = mapped_column(String, nullable=False)
34
35 addresses_style_one: Mapped[List["Address"]] = relationship("Address")
36
37 addresses_style_two: Mapped[Set["Address"]] = relationship(
38 "Address", collection_class=set
39 )
40
41
42class Address(Base):

Callers

nothing calls this directly

Calls 2

mapped_columnFunction · 0.90
relationshipFunction · 0.90

Tested by

no test coverage detected