From 6231c45a2a6e19b016a8d940550688ed8df69ae0 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 13 Dec 2017 12:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=A4=9A=E5=AF=B9=E5=A4=9A?= =?UTF-8?q?=E7=9A=84=E5=A4=9A=E6=AC=A1=E6=9F=A5=E8=AF=A2BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/model/relation/BelongsToMany.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/model/relation/BelongsToMany.php b/library/think/model/relation/BelongsToMany.php index 2fc00ae8..0c9f8375 100644 --- a/library/think/model/relation/BelongsToMany.php +++ b/library/think/model/relation/BelongsToMany.php @@ -383,7 +383,7 @@ class BelongsToMany extends Relation { // 关联查询封装 $tableName = $this->query->getTable(); - $table = $this->pivot->getTable(); + $table = $this->pivot->getTable($this->middle); $fields = $this->getQueryFields($tableName); $query = $this->query->field($fields)