diff --git a/framework/db/ar/ActiveQuery.php b/framework/db/ar/ActiveQuery.php index 9b2f7e8..8007ad7 100644 --- a/framework/db/ar/ActiveQuery.php +++ b/framework/db/ar/ActiveQuery.php @@ -296,4 +296,14 @@ class ActiveQuery extends BaseQuery implements \IteratorAggregate, \ArrayAccess, } unset($this->records[$offset]); } + + protected function findRecords($all = true) + { + $finder = new ActiveFinder($this->getDbConnection()); + if (!empty($this->with)) { + return $finder->findRecordsWithRelations(); + } else { + return $finder->findRecords($this, $all); + } + } }