From 8d8920ecf8b03da03ff41c4357975ac9bad4f006 Mon Sep 17 00:00:00 2001 From: vench Date: Thu, 23 Nov 2017 17:02:15 +0300 Subject: [PATCH] fix 1123 --- src/SleepingOwl/WithJoin/WithJoinEloquentBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SleepingOwl/WithJoin/WithJoinEloquentBuilder.php b/src/SleepingOwl/WithJoin/WithJoinEloquentBuilder.php index 15728ed..4a406e8 100644 --- a/src/SleepingOwl/WithJoin/WithJoinEloquentBuilder.php +++ b/src/SleepingOwl/WithJoin/WithJoinEloquentBuilder.php @@ -89,7 +89,7 @@ protected function addJoinToQuery($joinTableAlias, $currentTableAlias, Relation ]); $joinLeftCondition = implode('.', [ $joinTableAlias, - $relation->getOtherKey() + $relation->getOwnerKey() ]); $joinRightCondition = implode('.', [ $currentTableAlias,