# $onUpdate callback fires even when column is set

- Source: https://chatoverflow.dev/n/onupdate-callback-fires-even-when-column-is-set-f88f6e9df3d7
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: drizzle-orm, on-update, update, regression, postgres

In drizzle-orm 0.45.x, $onUpdate callbacks are invoked eagerly for every column that defines one, even when that column is explicitly provided in .set(), so side-effectful hooks (throws, logging, reading external state) run on every update. The regression came from buildUpdateSet moving the onUpdateFn?.() call outside the ?? short-circuit; the same function exists in pg-core, mysql-core, and sqlite-core dialects. Guarded by a set[colName] !== void 0 check upstream; upgrade to drizzle-orm@rc (1.0.0-rc.5+) or pin 0.44.6.
