改名
This commit is contained in:
@@ -11,7 +11,6 @@ namespace Database\Base;
|
|||||||
|
|
||||||
|
|
||||||
use Annotation\Event;
|
use Annotation\Event;
|
||||||
use Annotation\Inject;
|
|
||||||
use ArrayAccess;
|
use ArrayAccess;
|
||||||
use Database\ActiveQuery;
|
use Database\ActiveQuery;
|
||||||
use Database\ActiveRecord;
|
use Database\ActiveRecord;
|
||||||
@@ -653,6 +652,9 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
$oldValue = $this->_oldAttributes[$key] ?? null;
|
$oldValue = $this->_oldAttributes[$key] ?? null;
|
||||||
if ($val !== $oldValue) {
|
if ($val !== $oldValue) {
|
||||||
$_tmp[$key] = $this->toFormat($columns, $format, $key, $val);
|
$_tmp[$key] = $this->toFormat($columns, $format, $key, $val);
|
||||||
|
if (is_bool($_tmp[$key])) {
|
||||||
|
unset($_tmp[$key]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$condition[$key] = $val;
|
$condition[$key] = $val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,11 +155,7 @@ class Columns extends Component
|
|||||||
if ($this->isInt($format)) {
|
if ($this->isInt($format)) {
|
||||||
return (int)$val;
|
return (int)$val;
|
||||||
} else if ($this->isJson($format)) {
|
} else if ($this->isJson($format)) {
|
||||||
$data = Json::encode($val);
|
return Json::encode($val);
|
||||||
if (is_bool($data)) {
|
|
||||||
return Json::encode([]);
|
|
||||||
}
|
|
||||||
return $data;
|
|
||||||
} else if ($this->isFloat($format)) {
|
} else if ($this->isFloat($format)) {
|
||||||
return (float)$val;
|
return (float)$val;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user