Browse Source

FIX: Relation names not mangled in \yii\db\ActiveQuery::normalizeRelations

tags/2.0.0-beta
mcd-php 11 years ago
parent
commit
365bdcf68a
  1. 7
      framework/yii/db/ActiveQuery.php

7
framework/yii/db/ActiveQuery.php

@ -308,13 +308,12 @@ class ActiveQuery extends Query
$childName = null;
}
$t = strtolower($name);
if (!isset($relations[$t])) {
if (!isset($relations[$name])) {
$relation = $model->getRelation($name);
$relation->primaryModel = null;
$relations[$t] = $relation;
$relations[$name] = $relation;
} else {
$relation = $relations[$t];
$relation = $relations[$name];
}
if (isset($childName)) {

Loading…
Cancel
Save