Every time, I want to edit a model with a 'unique' validation rule, the following error shows:
QueryException in Connection.php line 651:
SQLSTATE[42S22]: Column not found: 1054 Unknown column '4' in 'where clause' (SQL: select count(*) as aggregate from `sports` where `4` = football)
For one of my models ("Sport") in table "sports", the validation rule looks like this:
Furthermore, the model derives from 'SleepingOwl\Models\SleepingOwlModel'
and getValidationRules() is set (it also works, when no "unique" field is set):
public function getValidationRules()
{
return $this->rules;
}
Every time, I want to edit a model with a 'unique' validation rule, the following error shows:
For one of my models ("Sport") in table "sports", the validation rule looks like this:
My edit form contains the respective two fields:
Furthermore, the model derives from 'SleepingOwl\Models\SleepingOwlModel' and getValidationRules() is set (it also works, when no "unique" field is set):
Thanks for any help on that issue!