mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 14:52:47 +08:00
改进一对一关联
This commit is contained in:
@@ -52,6 +52,7 @@ class BelongsTo extends OneToOne
|
||||
call_user_func_array($closure, [ & $this->query]);
|
||||
}
|
||||
$relationModel = $this->query
|
||||
->removeWhereField($this->localKey)
|
||||
->where($this->localKey, $this->parent->$foreignKey)
|
||||
->relation($subRelation)
|
||||
->find();
|
||||
|
||||
Reference in New Issue
Block a user