validate schema after calling `beforeCreate`
Created by: jurajsimbs
model schema needs to be validated after beforeCreate
hook, not before it.
We might have some mandatory fields like this:
schema: {
//..............
unique_identifier: {
type: DataTypes.STRING,
allowEmptyValue: false,
},
//..............
}
but don't want to insert them via .create
method - but compute them in beforeCreate
hook