MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / Parent

Class Parent

examples/versioned_rows/versioned_rows_w_versionid.py:118–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116
117
118class Parent(Base):
119 __tablename__ = "parent"
120 id = Column(Integer, primary_key=True)
121 child_id = Column(Integer)
122 child_version_id = Column(Integer)
123 child = relationship("Child", backref=backref("parent", uselist=False))
124
125 __table_args__ = (
126 ForeignKeyConstraint(
127 ["child_id", "child_version_id"], ["child.id", "child.version_id"]
128 ),
129 )
130
131
132class Child(Versioned, Base):

Callers 1

Calls 4

ColumnClass · 0.90
relationshipFunction · 0.90
backrefFunction · 0.90

Tested by

no test coverage detected