# Model
# Static Properties
# softDeleteConfig
Type:
ObjectThe property that holds the model configuration.
See also: Available Options
# Static Methods
# softDelete
Type:
(id: string | number | Array | Function) => PromiseSoft delete a model by primary key(s), composite primary key(s), or expression function.
Returns a Promise that resolves with the soft deleted models.
See also: Deleting
# Instance Methods
# $softDelete
Type:
(hydrate?: boolean) => PromiseSoft delete the model instance. By default, this updates only the
keyandflagNameattribute values on the instance after they are persisted to the store.Passing
hydrateastruewill also hydrate the given instance. This is useful where there may bebeforeUpdate/afterUpdatehooks on the model that may mutate other values or to simply update instance with the latest data from the store. However, if the instance has any relation attributes loaded throughwith, they will be reset during hydration.Returns a Promise that resolves with the soft deleted model.
See also: Deleting
# $restore
Type:
(hydrate?: boolean) => PromiseRestore the model instance into an active state.
Passing
hydrateastruewill also hydrate the given instance. See $softDelete for more info.Returns a Promise that resolves with the restored model.
See also: Restoring
# $trashed
Query →