改名
This commit is contained in:
@@ -142,7 +142,6 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $name
|
* @param $name
|
||||||
* @param $method
|
* @param $method
|
||||||
@@ -1006,11 +1005,14 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public static function populate(array $data): static
|
public static function populate(array $data): static
|
||||||
{
|
{
|
||||||
|
$create = microtime(true);
|
||||||
/** @var static $model */
|
/** @var static $model */
|
||||||
$model = Snowflake::createObject(static::class);
|
$model = Snowflake::createObject(static::class);
|
||||||
$model->_attributes = $data;
|
$model->_attributes = $data;
|
||||||
$model->_oldAttributes = $data;
|
$model->_oldAttributes = $data;
|
||||||
$model->setIsCreate(false);
|
$model->setIsCreate(false);
|
||||||
|
|
||||||
|
echo 'end create -> ' . (microtime(true) - $create);
|
||||||
return $model;
|
return $model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user