Skip to content

Commit

Permalink
fixed cast related issues in PaginatedModelsLoader::loadRelatedModels…
Browse files Browse the repository at this point in the history
… by using $relatedModel->getRawOriginal() instead of $relatedModel->getOriginal()
  • Loading branch information
skaesdorf authored and spawnia committed May 5, 2024
1 parent 998e286 commit 1e738e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Execution/ModelsLoader/PaginatedModelsLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function loadRelatedModels(EloquentCollection $parents): EloquentColle
return $relatedModels->unique(
// Compare all attributes because there might not be a unique primary key
// or there could be differing pivot attributes.
static fn (Model $relatedModel): string => json_encode($relatedModel->getOriginal()),
static fn (Model $relatedModel): string => json_encode($relatedModel->getRawOriginal()),
);
}

Expand Down

0 comments on commit 1e738e0

Please sign in to comment.