onupdate based on another field with sqlalchemy declarative base
问题 I use sqlalchemy with the pyramid framework, and i want to link a person to his geographical department using his postcode. So i try to use the onupdate argument when defining the department_id column define the department_id. see fallowing code: from datetime import date from emailing.models import Base, DBSession from sqlalchemy import Column, Integer, Unicode, Text, DateTime, Sequence, Boolean, Date, UnicodeText, UniqueConstraint, Table, ForeignKey from sqlalchemy.orm import scoped_session