mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
代码改进
This commit is contained in:
@@ -105,9 +105,8 @@ class BelongsToMany extends Relation
|
|||||||
{
|
{
|
||||||
$foreignKey = $this->foreignKey;
|
$foreignKey = $this->foreignKey;
|
||||||
$localKey = $this->localKey;
|
$localKey = $this->localKey;
|
||||||
$middle = $this->middle;
|
$pk = $this->parent->getPk();
|
||||||
// 关联查询
|
// 关联查询
|
||||||
$pk = $this->parent->getPk();
|
|
||||||
$condition['pivot.' . $localKey] = $this->parent->$pk;
|
$condition['pivot.' . $localKey] = $this->parent->$pk;
|
||||||
return $this->belongsToManyQuery($foreignKey, $localKey, $condition);
|
return $this->belongsToManyQuery($foreignKey, $localKey, $condition);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user