Commit 7fb4bfdd by Klimov Paul

Sphinx Active Query fixed

parent cfb3e98b
...@@ -39,7 +39,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface ...@@ -39,7 +39,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
if (!empty($rows)) { if (!empty($rows)) {
$models = $this->createModels($rows); $models = $this->createModels($rows);
if (!empty($this->with)) { if (!empty($this->with)) {
$this->populateRelations($models, $this->with); $this->findWith($this->with, $models);
} }
return $models; return $models;
} else { } else {
...@@ -69,7 +69,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface ...@@ -69,7 +69,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
} }
if (!empty($this->with)) { if (!empty($this->with)) {
$models = [$model]; $models = [$model];
$this->populateRelations($models, $this->with); $this->findWith($this->with, $models);
$model = $models[0]; $model = $models[0];
} }
return $model; return $model;
......
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