diff --git a/rattail_tempmon/db/model.py b/rattail_tempmon/db/model.py index ba7e63a..b3e1ece 100644 --- a/rattail_tempmon/db/model.py +++ b/rattail_tempmon/db/model.py @@ -135,7 +135,10 @@ class Reading(Base): Client, doc=""" Reference to the tempmon client which took this reading. - """) + """, + backref=orm.backref( + 'readings', + cascade='all, delete-orphan')) probe_uuid = sa.Column(sa.String(length=32), nullable=False) probe = orm.relationship(