Commit 365bdcf6 by mcd-php

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

parent baaab4e0
......@@ -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)) {
......
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