Interface ModelHooks<M, TAttributes>
interface ModelHooks<M, TAttributes> { _UNSTABLE_afterBulkDestroy(options,
deletedCount): AsyncHookReturn; _UNSTABLE_beforeBulkDestroy(options): AsyncHookReturn; afterAssociate(data,
options): AsyncHookReturn; afterBulkCreate(instances,
options): AsyncHookReturn; afterBulkDestroy(options): AsyncHookReturn; afterBulkRestore(options): AsyncHookReturn; afterBulkUpdate(options): AsyncHookReturn; afterCreate(attributes,
options): AsyncHookReturn; afterDefinitionRefresh(): void; afterDestroy(instance,
options): AsyncHookReturn; afterDestroyMany(instances,
options,
deletedCount): AsyncHookReturn; afterFind(instancesOrInstance,
options): AsyncHookReturn; afterRestore(instance,
options): AsyncHookReturn; afterSave(instance,
options): AsyncHookReturn; afterSync(options): AsyncHookReturn; afterUpdate(instance,
options): AsyncHookReturn; afterUpsert(attributes,
options): AsyncHookReturn; afterValidate(instance,
options): AsyncHookReturn; beforeAssociate(data,
options): AsyncHookReturn; beforeBulkCreate(instances,
options): AsyncHookReturn; beforeBulkDestroy(options): AsyncHookReturn; beforeBulkRestore(options): AsyncHookReturn; beforeBulkUpdate(options): AsyncHookReturn; beforeCount(options): AsyncHookReturn; beforeCreate(attributes,
options): AsyncHookReturn; beforeDefinitionRefresh(): void; beforeDestroy(instance,
options): AsyncHookReturn; beforeDestroyMany(instances,
options): AsyncHookReturn; beforeFind(options): AsyncHookReturn; beforeFindAfterExpandIncludeAll(options): AsyncHookReturn; beforeFindAfterOptions(options): AsyncHookReturn; beforeRestore(instance,
options): AsyncHookReturn; beforeSave(instance,
options): AsyncHookReturn; beforeSync(options): AsyncHookReturn; beforeUpdate(instance,
options): AsyncHookReturn; beforeUpsert(attributes,
options): AsyncHookReturn; beforeValidate(instance,
options): AsyncHookReturn; validationFailed(instance,
options,
error): AsyncHookReturn; } Methods
_UNSTABLE_afterBulkDestroy
_UNSTABLE_beforeBulkDestroy
afterDefinitionRefresh
- afterDefinitionRefresh(): void
Returns void
beforeDefinitionRefresh
- beforeDefinitionRefresh(): void
Returns void
beforeFindAfterExpandIncludeAll
Runs after the definition of the model has changed because ModelDefinition#refreshAttributes was called.