This commit is contained in:
2022-09-21 14:40:24 +08:00
parent 1bc5e49b42
commit fc828df683
+4 -1
View File
@@ -661,9 +661,12 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
{
$assoc = array_diff_assoc($this->_attributes, $this->_oldAttributes);
$column = $this->getColumns();
$uassoc = array_intersect_assoc($this->_attributes, $this->_oldAttributes);
foreach ($assoc as $key => $item) {
if ($item === null) {
$encode = $column->get_fields($key);
if ($column->isString($encode) && $item === null) {
unset($assoc[$key]);
}
}