Browse Source

Sphinx Active Query fixed

tags/2.0.0-beta
Klimov Paul 11 years ago
parent
commit
7fb4bfdd21
  1. 4
      extensions/sphinx/ActiveQuery.php

4
extensions/sphinx/ActiveQuery.php

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

Loading…
Cancel
Save