e
This commit is contained in:
@@ -218,10 +218,9 @@ class ActiveQuery extends Component
|
|||||||
*/
|
*/
|
||||||
public function all()
|
public function all()
|
||||||
{
|
{
|
||||||
$collect = new Collection($this,
|
$collect = new Collection($this, $this->modelClass::getDb()
|
||||||
$this->modelClass::getDb()->createCommand($this->queryBuilder())->all()
|
->createCommand($this->queryBuilder())
|
||||||
, $this->modelClass
|
->all(), $this->modelClass);
|
||||||
);
|
|
||||||
if ($this->asArray) {
|
if ($this->asArray) {
|
||||||
return $collect->toArray();
|
return $collect->toArray();
|
||||||
}
|
}
|
||||||
@@ -234,7 +233,7 @@ class ActiveQuery extends Component
|
|||||||
* @return ActiveRecord
|
* @return ActiveRecord
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function populate($model, $data)
|
public function populate(ActiveRecord $model, $data)
|
||||||
{
|
{
|
||||||
return $this->getWith($model::populate($data));
|
return $this->getWith($model::populate($data));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user