MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / B

Class B

test/orm/test_dynamic.py:1559–1568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1557 )
1558
1559 class B(decl_base):
1560 __tablename__ = "b"
1561 id: Mapped[int] = mapped_column(Identity(), primary_key=True)
1562 a_id: Mapped[int] = mapped_column(
1563 ForeignKey(
1564 "a.id",
1565 ondelete="cascade" if cascade_deletes else "set null",
1566 ),
1567 nullable=not cascade_deletes,
1568 )
1569
1570 decl_base.metadata.create_all(connection)
1571 return A, B

Callers 2

test_remove_orphansMethod · 0.70

Calls 3

mapped_columnFunction · 0.90
IdentityClass · 0.90
ForeignKeyClass · 0.90

Tested by 2

test_remove_orphansMethod · 0.56