变更
This commit is contained in:
@@ -11,6 +11,7 @@ namespace Database;
|
|||||||
|
|
||||||
|
|
||||||
use Database\Base\Getter;
|
use Database\Base\Getter;
|
||||||
|
use Database\Traits\HasBase;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Kiri;
|
use Kiri;
|
||||||
use Kiri\Exception\NotFindClassException;
|
use Kiri\Exception\NotFindClassException;
|
||||||
@@ -264,6 +265,9 @@ class Model extends Base\Model
|
|||||||
$with = $this->getWith();
|
$with = $this->getWith();
|
||||||
foreach ($with as $value) {
|
foreach ($with as $value) {
|
||||||
$join = $this->{'get' . ucfirst($value)}();
|
$join = $this->{'get' . ucfirst($value)}();
|
||||||
|
if ($join instanceof HasBase) {
|
||||||
|
$join = $join->get();
|
||||||
|
}
|
||||||
if ($join instanceof Kiri\ToArray) {
|
if ($join instanceof Kiri\ToArray) {
|
||||||
$join = $join->toArray();
|
$join = $join->toArray();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user