This commit is contained in:
2021-03-04 15:44:11 +08:00
parent 3dd0abfc0e
commit ea7baddd31
+1 -3
View File
@@ -858,7 +858,6 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
{
$value = $this->_attributes[$name] ?? null;
if ($this->hasAnnotation($name)) {
var_dump($name, $value);
return $this->runAnnotation($name, $value);
}
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) {
return new $className();
});
$model->setAttributes($data);
$model->setOldAttributes($data);
$model->setIsCreate(false);
$model->refresh();
return $model;
}