Skip to content

Commit 55807d7

Browse files
BaseModel - Remove usage of primaryKey property which was left out when split was done
1 parent 83e44c6 commit 55807d7

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

system/BaseModel.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,13 +1675,6 @@ protected function objectToRawArray($data, bool $onlyChanged = true, bool $recur
16751675
if (method_exists($data, 'toRawArray'))
16761676
{
16771677
$properties = $data->toRawArray($onlyChanged, $recursive);
1678-
1679-
// Always grab the primary key otherwise updates will fail.
1680-
if (! empty($properties) && ! empty($this->primaryKey) && ! in_array($this->primaryKey, $properties, true)
1681-
&& ! empty($data->{$this->primaryKey}))
1682-
{
1683-
$properties[$this->primaryKey] = $data->{$this->primaryKey};
1684-
}
16851678
}
16861679
else
16871680
{

0 commit comments

Comments
 (0)