diff --git a/Database/ActiveRecord.php b/Database/ActiveRecord.php index 76f8fbfe..796adb47 100644 --- a/Database/ActiveRecord.php +++ b/Database/ActiveRecord.php @@ -297,14 +297,16 @@ class ActiveRecord extends BaseActiveRecord { $relates = []; if (empty($with = $this->getWith())) { + var_dump($with); return $relates; } - foreach ($this->_with as $val) { + foreach ($with as $val) { $relates[$val] = $this->resolveObject($val); } return $relates; } + /** * @param $data * @return ActiveRecord