SQLAlchemy - how to map against a read-only (or calculated) property
- by Jeff Peck
I'm trying to figure out how to map against a simple read-only property and have that property fire when I save to the database.
A contrived example should make this more clear. First, a simple table:
meta = MetaData()
foo_table = Table('foo', meta,
Column('id', String(3), primary_key=True),
Column('description', String(64),…