Skip to content

Commit

Permalink
fix HasOneJoin current table primary key
Browse files Browse the repository at this point in the history
  • Loading branch information
fico7489 committed Feb 23, 2018
1 parent e606402 commit a5daf21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/EloquentJoinTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private function performJoin($builder, $relations)

$relatedRelation = $currentModel->$relation();
$relatedModel = $relatedRelation->getRelated();
$relatedPrimaryKey = $currentModel->getKeyName();
$relatedPrimaryKey = $relatedModel->getKeyName();
$relatedTable = $relatedModel->getTable();

$this->validateJoinQuery($relatedModel);
Expand Down

0 comments on commit a5daf21

Please sign in to comment.