Skip to content

Commit

Permalink
Merge pull request #124 from horstoeko/HasOneTrough
Browse files Browse the repository at this point in the history
HandlesRelationStandardOperations->isOneToOneRelation seems to ignore HasOneThrough
  • Loading branch information
alexzarbn authored Oct 4, 2021
2 parents 33a1d61 + b629263 commit 4716556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Concerns/HandlesRelationStandardOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ protected function runRelationFetchQuery(Request $request, Relation $query, Mode
protected function isOneToOneRelation(Model $parentEntity)
{
$relation = $parentEntity->{$this->getRelation()}();
return $relation instanceof HasOne || $relation instanceof MorphOne || $relation instanceof BelongsTo;
return $relation instanceof HasOne || $relation instanceof MorphOne || $relation instanceof BelongsTo || $relation instanceof HasOneThrough;
}

/**
Expand Down

0 comments on commit 4716556

Please sign in to comment.