Function: BeforeUpdate()
BeforeUpdate():
MethodDecorator
Defined in: src/decorators/LifecycleHooks.ts:73
Method decorator marking a method to run immediately before an existing entity is updated.
Returns
MethodDecorator
Usecase
Recalculate totals, validate update constraints, or track modification history.
Example
@BeforeUpdate()
onUpdate() {
this.updatedCount = (this.updatedCount || 0) + 1;
}