Commit ba9f5d65 by Thiago Talma

Allow add a condition telling the table to avoid ambiguity error.

parent 0d720e06
......@@ -69,7 +69,13 @@ class <?= $searchModelClass ?> extends Model
protected function addCondition($query, $attribute, $partialMatch = false)
{
$value = $this->$attribute;
if (($pos = strrpos($attribute, '.')) !== false) {
$modelAttribute = substr($attribute, $pos + 1);
} else {
$modelAttribute = $attribute;
}
$value = $this->$modelAttribute;
if (trim($value) === '') {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment