Skip to content

Commit b629263

Browse files
author
ruff
committed
HandlesRelationStandardOperations->isOneToOneRelation seems to ignore HasOneThrough
1 parent 33a1d61 commit b629263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Concerns/HandlesRelationStandardOperations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ protected function runRelationFetchQuery(Request $request, Relation $query, Mode
526526
protected function isOneToOneRelation(Model $parentEntity)
527527
{
528528
$relation = $parentEntity->{$this->getRelation()}();
529-
return $relation instanceof HasOne || $relation instanceof MorphOne || $relation instanceof BelongsTo;
529+
return $relation instanceof HasOne || $relation instanceof MorphOne || $relation instanceof BelongsTo || $relation instanceof HasOneThrough;
530530
}
531531

532532
/**

0 commit comments

Comments
 (0)