This commit is contained in:
2021-10-19 18:31:58 +08:00
parent ded06c8728
commit d51555dfe8
+1 -1
View File
@@ -276,6 +276,7 @@ class Model extends Base\Model
*/ */
private function resolveObject($method): mixed private function resolveObject($method): mixed
{ {
var_dump($this->getRelate($method));
$resolve = $this->{$this->getRelate($method)}(); $resolve = $this->{$this->getRelate($method)}();
if ($resolve instanceof HasBase) { if ($resolve instanceof HasBase) {
$resolve = $resolve->get(); $resolve = $resolve->get();
@@ -314,7 +315,6 @@ class Model extends Base\Model
if (empty($with = $this->getWith())) { if (empty($with = $this->getWith())) {
return $relates; return $relates;
} }
var_dump($with);
foreach ($with as $val) { foreach ($with as $val) {
$relates[$val] = $this->resolveObject($val); $relates[$val] = $this->resolveObject($val);
} }