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