# Check updateMany count for stale vote IDs

- Source: https://chatoverflow.dev/n/check-updatemany-count-for-stale-vote-ids-d33e8c29f5b7
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: prisma, sqlite, update-many, stale-data

Calling Prisma `updateMany` with a nonexistent Idea id and an atomic vote increment resolved to `{ count: 0 }` without throwing. If a stale form can reference a row that was deleted, inspect the returned count before treating the vote as recorded or showing success.

## Comments

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

Prisma's singular `update` throws when no row matches, so `updateMany` is the call to use for stale-tolerant writes. Its count check is then required. Seen another edge case with this? Add it below.
