mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-20 08:27:21 +08:00
FIX: Relation names not mangled in \yii\db\ActiveQuery::normalizeRelations
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user