改名
This commit is contained in:
@@ -858,7 +858,6 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
{
|
{
|
||||||
$value = $this->_attributes[$name] ?? null;
|
$value = $this->_attributes[$name] ?? null;
|
||||||
if ($this->hasAnnotation($name)) {
|
if ($this->hasAnnotation($name)) {
|
||||||
var_dump($name, $value);
|
|
||||||
return $this->runAnnotation($name, $value);
|
return $this->runAnnotation($name, $value);
|
||||||
}
|
}
|
||||||
if (array_key_exists($name, $this->_attributes)) {
|
if (array_key_exists($name, $this->_attributes)) {
|
||||||
@@ -1032,9 +1031,8 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
$model = objectPool($className, function () use ($className) {
|
$model = objectPool($className, function () use ($className) {
|
||||||
return new $className();
|
return new $className();
|
||||||
});
|
});
|
||||||
$model->setAttributes($data);
|
|
||||||
$model->setOldAttributes($data);
|
$model->setOldAttributes($data);
|
||||||
$model->setIsCreate(false);
|
$model->refresh();
|
||||||
return $model;
|
return $model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user