Browse Source

Fixes #885: removed NULLs from filtering by models.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
c2a3aa3d99
  1. 4
      framework/yii/db/ActiveRelation.php

4
framework/yii/db/ActiveRelation.php

@ -279,7 +279,9 @@ class ActiveRelation extends ActiveQuery
// single key
$attribute = reset($this->link);
foreach ($models as $model) {
$values[] = $model[$attribute];
if (($value = $model[$attribute]) !== null) {
$values[] = $value;
}
}
} else {
// composite keys

Loading…
Cancel
Save