SQLAlchemy Cheatsheet 17 — Inheritance and Polymorphism
Cheatsheet: single-table inheritance, joined-table inheritance, concrete inheritance, polymorphic loading, with_polymorphic.
Cheatsheet: single-table inheritance, joined-table inheritance, concrete inheritance, polymorphic loading, with_polymorphic.
Cheatsheet: try/except/else/finally, raise from, ExceptionGroup, custom hierarchies.
Cheatsheet: branded ID types, Decimal for money, phone validation, EmailStr, AwareDatetime.
Cheatsheet: when to use hybrid_property vs column_property vs Computed, with FastAPI integration.
Cheatsheet: unittest.mock, freezegun, snapshot, hypothesis, factory_boy.
Cheatsheet: parametrized tests, ValidationError assertions, factories, round-trip tests.
Cheatsheet: outbox emit on commit, CDC via Debezium, logical replication, SKIP LOCKED worker pattern.
Cheatsheet: full pyproject.toml, pre-commit, GitHub Actions, layout, conventions.
Cheatsheet: method renames, Config → model_config, validator decorators, codemod (bump-pydantic).
Cheatsheet: cursor pagination, filter from Pydantic, sort safelist, bulk upsert, COPY-fast loads.