Skip to content

Commit 0b1d492

Browse files
author
Marius
committed
Replace load relations because of red and write db replica issues on create
1 parent a68df15 commit 0b1d492

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Services/BaseResourceService.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ abstract protected function setBaseModel(): void;
162162

163163
protected function addRelationsToExistingModel(array $withRelations, BaseModel $model): void
164164
{
165-
$model->load($withRelations);
165+
foreach ($withRelations as $relationName) {
166+
$model->{$relationName};
167+
}
166168
}
167169

168170
/**

0 commit comments

Comments
 (0)