diff --git a/system/Model.php b/system/Model.php index c0c8142fdad0..25b2b354b990 100644 --- a/system/Model.php +++ b/system/Model.php @@ -799,12 +799,13 @@ protected function objectToRawArray($data, bool $onlyChanged = true, bool $recur $primaryKey = $data->{$this->primaryKey}; - // Restore Entity cast setting. + // Restore Entity casting setting. $data->cast($cast); } // Always grab the primary key otherwise updates will fail. if ( + // @TODO Should use `$data instanceof Entity`. method_exists($data, 'toRawArray') && ( ! empty($properties)