Defines hooks to be run before inserts, patches, and updates to a database entry. Can perform additional checks or validations, as well as mutate the objects.
Preserves default behavior when true
. If false
, old database record values will be ignored when patching and updating. Please be aware of the repercusions: see static update
and patch
for more information.
Default: true
.
Defines the order in which tasks will run. See IOrder
.
A JSON Schema intended for partial validation to be run when data objects are mutated by the before hooks. If the data fails to pass the schema validation, an Objection.js ValidationError
will be thrown via Model.createValidationError()
.
Allows unique checks before inserts, patches, and updates. Unique tests can be determined either by a IUnique
object specifying the columns to be considered, or by a query returning function.
Generated using TypeDoc
obau()
options.