Lifecycle
SugoiJS supply predefined ORM lifecycle

Overview

SugoiJS ORM uses pre-defined model lifecycle hooks which apply during the CRUD calls.

Save & Update

The save & update hooks can be implemented using the following interfaces:
  1. 1.
    IBeforeValidate
  2. 2.
    IValidate
  3. 3.
    IBeforeSave / IBeforeUpdate
  4. 4.
    IAfterSave / IAfterUpdate
SugoiJS save and update lifecycle hooks

Find & Remove

The find & remove hooks can be implemented using the follow interfaces:
  1. 1.
    IBeforeFind/IBeforeRemove
  2. 2.
    IAfterFind/IAfterRemove
SugoiJS find and remove lifecycle hooks
Last modified 2yr ago