Skip to content

Commit

Permalink
use fromRawAttributes() for custom pivot models
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin committed Jul 29, 2024
1 parent 7c58583 commit 6a4a620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ public function newRelationPivot($relationName, $parent, $attributes, $table, $e

if (!is_null($definition) && array_key_exists('pivotModel', $definition)) {
$pivotModel = $definition['pivotModel'];
return $pivotModel::fromAttributes($parent, $attributes, $table, $exists);
return $pivotModel::fromRawAttributes($parent, $attributes, $table, $exists);
}
}

Expand Down

0 comments on commit 6a4a620

Please sign in to comment.