MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / Address

Class Address

test/orm/declarative/test_basic.py:1226–1235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1224 addresses = relationship("Address", backref="user")
1225
1226 class Address(Base, ComparableEntity):
1227 __tablename__ = "addresses"
1228
1229 id = Column(
1230 Integer, primary_key=True, test_needs_autoincrement=True
1231 )
1232 email = Column(String(50), key="_email")
1233 user_id = Column(
1234 "user_id", Integer, ForeignKey("users.id"), key="_user_id"
1235 )
1236
1237 Base.metadata.create_all(testing.db)
1238

Callers 13

test_as_declarativeMethod · 0.70
test_basicMethod · 0.70
goMethod · 0.70
test_eager_order_byMethod · 0.70
test_order_by_multiMethod · 0.70
test_expressionMethod · 0.70

Calls 5

ColumnClass · 0.90
StringClass · 0.90
ForeignKeyClass · 0.90
relationshipFunction · 0.90
backrefFunction · 0.90

Tested by 13

test_as_declarativeMethod · 0.56
test_basicMethod · 0.56
goMethod · 0.56
test_eager_order_byMethod · 0.56
test_order_by_multiMethod · 0.56
test_expressionMethod · 0.56