diff --git a/src/Database/Model.php b/src/Database/Model.php index 40390596..8dfcc382 100644 --- a/src/Database/Model.php +++ b/src/Database/Model.php @@ -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); } }