maybe can fix this, byass id checking if it is NULL , there should be no if($id), no checking need so WhereIn to be work
Code:
protected function doUpdate($id = null, $data = null): bool
{
$escape = $this->escape;
$this->escape = [];
$builder = $this->builder();
if ($id) {
$builder = $builder->whereIn($this->table . '.' . $this->primaryKey, $id);
}
// Must use the set() method to ensure to set the correct escape flag
foreach ($data as $key => $val) {
$builder->set($key, $val, $escape[$key] ?? null);
}
return $builder->update();
}