mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
改进belongstomany的查询字段指定
This commit is contained in:
@@ -376,7 +376,9 @@ class BelongsToMany extends Relation
|
||||
// 关联查询封装
|
||||
$tableName = $this->query->getTable();
|
||||
$table = $this->pivot->getTable();
|
||||
$query = $this->query->field($tableName . '.*')
|
||||
$fields = $this->getQueryFields($tableName);
|
||||
|
||||
$query = $this->query->field($fields)
|
||||
->field(true, false, $table, 'pivot', 'pivot__');
|
||||
|
||||
if (empty($this->baseQuery)) {
|
||||
|
||||
Reference in New Issue
Block a user