修正多对多的多次查询BUG

This commit is contained in:
thinkphp
2017-12-13 12:44:04 +08:00
parent 3e5b3c85ba
commit 6231c45a2a

View File

@@ -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)