From f77e6f7be3b4fff766633fa1389cde874a97f43c Mon Sep 17 00:00:00 2001 From: moyou <42432833+biiiiiigmonster@users.noreply.github.com> Date: Tue, 22 Dec 2020 14:18:13 +0800 Subject: [PATCH] Update RelationMixin.php --- src/Database/Eloquent/RelationMixin.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Database/Eloquent/RelationMixin.php b/src/Database/Eloquent/RelationMixin.php index 8908f03..5d503cb 100644 --- a/src/Database/Eloquent/RelationMixin.php +++ b/src/Database/Eloquent/RelationMixin.php @@ -62,13 +62,15 @@ public function getRelationInQuery(): Closure $hasManyThrough = function (Builder $query, Builder $parentQuery, $columns = ['*']): Builder{ /** @var HasManyThrough $this */ $columns = $columns == ['*'] ? $this->getQualifiedFirstKeyName() : $columns; - if ($parentQuery->getQuery()->from === $query->getQuery()->from) { - return $this->getRelationExistenceQueryForSelfRelation($query, $parentQuery, $columns); - } +// if ($parentQuery->getQuery()->from === $query->getQuery()->from) { + // TODO +// return $this->getRelationExistenceQueryForSelfRelation($query, $parentQuery, $columns); +// } - if ($parentQuery->getQuery()->from === $this->throughParent->getTable()) { - return $this->getRelationExistenceQueryForThroughSelfRelation($query, $parentQuery, $columns); - } +// if ($parentQuery->getQuery()->from === $this->throughParent->getTable()) { + // TODO +// return $this->getRelationExistenceQueryForThroughSelfRelation($query, $parentQuery, $columns); +// } $this->performJoin($query);