Automatically invoked callback when a model exception is triggered internally (ex type conversion exception)
- accepts (model <: AbstractModel, ex::TypeConversionException)
- returns model <: AbstractModel
Automatically invoked when model data is retrieved from the DB (on find
methods). It will be invoked for each field in the model
- accepts (model <: AbstractModel, field_name::Symbol, value::Any)
- returns model <: AbstractModel
Automatically invoked after the object is retrieved from the DB
- accepts (model <: AbstractModel)
- return model <: AbstractModel
Automatically invoked when the object is being peristed to the DB
- accepts (model <: AbstractModel, field_name::Symbol, value::Any)
- returns model <: AbstractModel
Automatically invoked before the object is being peristed to the DB
- accepts (model <: AbstractModel)
- returns model <: AbstractModel
Automatically invoked after the object is being peristed to the DB
- accepts (model <: AbstractModel)
- returns model <: AbstractModel
Queries
SearchLight exposes two similar data persistence methods: save! and save. They both perform the same action (persisting the object to the database), but save will return a Bool of value true to indicate that the operation was successful or a Bool of value false to indicate that the operation has failed. While the save! variant will return the persisted object upon success or will throw an exception on failure.
Configuration