Skip to main content
zerotal

Documentation


Documentation / zerotal / orm / HookName

Type Alias: HookName

HookName = "beforeCreate" | "afterCreate" | "beforeSave" | "afterSave" | "beforeUpdate" | "afterUpdate" | "beforeDelete" | "afterDelete" | "afterFind"

Defined in: packages/orm/src/model/hooks/HookRegistry.ts:9

The set of model lifecycle points a hook can attach to. Each fires once per persistence operation; beforeSave/afterSave wrap both inserts and updates, and afterFind fires when a row is hydrated from the database.