Skip to content

Commit

Permalink
Merge pull request #1155 from yajra/patch-add-select
Browse files Browse the repository at this point in the history
[7.0] Fix column name added when relation is belongsToMany.
  • Loading branch information
yajra authored May 22, 2017
2 parents b0e4171 + fd25d48 commit 5b5eff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Engines/QueryBuilderEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ protected function joinEagerLoadedColumn($relation, $relationColumn)
$foreign = $pivot . '.' . $tablePK;
$other = $related->getQualifiedKeyName();

$lastQuery->addSelect($table . '.' . $eachRelation);
$lastQuery->addSelect($table . '.' . $relationColumn);
$this->performJoin($table, $foreign, $other);

break;
Expand Down

0 comments on commit 5b5eff0

Please sign in to comment.