What about doing it in two steps...? ```python3 ModVersion.query.filter_by(ModVersion.game_id=game_id).delete() Mod.query.filter_by(Mod.game_id=game_id).delete() ```