Skip to content

Commit

Permalink
Merge pull request jarektkaczyk#22 from crlcu/master
Browse files Browse the repository at this point in the history
Fix the way join keys are set for a relation that's instance of HasManyThrough
  • Loading branch information
jarektkaczyk authored Apr 14, 2020
2 parents d46c674 + 83c3b30 commit f2d8aa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Relations/Joiner.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ protected function getJoinKeys(Relation $relation)
if ($relation instanceof HasManyThrough) {
$fk = $relation->getQualifiedFarKeyName();

return [$fk, $relation->getParent()->getQualifiedKeyName()];
return [$fk, $relation->getQualifiedParentKeyName()];
}
}
}

0 comments on commit f2d8aa0

Please sign in to comment.