Skip to content

Commit

Permalink
Fix rest cannot update model because primary id is removed from array…
Browse files Browse the repository at this point in the history
… when computing difference
  • Loading branch information
makoso committed Feb 24, 2024
1 parent a764759 commit c6aab4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Rest/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ private static function dataDiff(array $data1, array $data2): array
$diff[$key1] = $recursiveDiff;
}
} else {
if ($value1 != $data2[$key1]) {
if ($value1 != $data2[$key1] || $key1 === static::$PRIMARY_KEY) {
$diff[$key1] = $value1;
}
}
Expand Down

0 comments on commit c6aab4c

Please sign in to comment.