From dc96cff0742062cffa4158beda96b68bd2ffb491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 28 Oct 2020 16:51:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/Base/BaseActiveRecord.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 69f48663..5e39aff6 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -798,20 +798,10 @@ abstract class BaseActiveRecord extends Component implements IOrm, \ArrayAccess public static function populate(array $data) { $model = new static(); - $model->setAttributes(self::parse($data)); + $model->setAttributes($data); $model->setIsCreate(false); $model->refresh(); return $model; } - - /** - * @param $data - * @return array - * @throws Exception - */ - private static function parse($data) - { - return static::getColumns()->populate($data); - } }