How to update parent table timestamp when child table is modified?
How can I update parent timestamp when child table is modified? I would like to use parent table timestamp for checking if my rest client should update it's local version of these tables. class Parent(db.Model): id = db.Column(db.Integer, primary_key=True) version = db.Column(db.Integer) timestamp = db.Column(db.DateTime, default=datetime.utcnow, onupdate=datetime.utcnow) childs = db.relationship('Children', backref='parent', lazy='dynamic', cascade="all, delete-orphan") class Children(db.Model): id = db.Column(db.Integer, primary_key=True) version = db.Column(db.Integer) timestamp = db.Column