改名
This commit is contained in:
@@ -1060,8 +1060,11 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
||||
*/
|
||||
public static function populate(array $data): static
|
||||
{
|
||||
$class = Snowflake::app()->getChannel();
|
||||
/** @var static $model */
|
||||
$model = Snowflake::createObject(static::class);
|
||||
$model = $class->pop(static::class, function () {
|
||||
return new static();
|
||||
});
|
||||
$model->_attributes = $data;
|
||||
$model->_oldAttributes = $data;
|
||||
$model->setIsCreate(false);
|
||||
|
||||
Reference in New Issue
Block a user