mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进关联模型
This commit is contained in:
@@ -56,7 +56,10 @@ class MorphOne extends Relation
|
||||
if ($closure) {
|
||||
call_user_func_array($closure, [ & $this->query]);
|
||||
}
|
||||
return $this->relation($subRelation)->find();
|
||||
$relationModel = $this->relation($subRelation)->find();
|
||||
$relationModel->setParent(clone $this->parent);
|
||||
|
||||
return $relationModel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user