def METHOD_NAME(cls):
    return db.relationship(
        cls.stored_file_class,
        primaryjoin=lambda: cls.file_id == cls.stored_file_class.id,
        foreign_keys=lambda: cls.file_id,
        lazy=False,
        post_update=True
    )