改名
This commit is contained in:
@@ -900,10 +900,10 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public static function populate(array $data): static
|
public static function populate(array $data): static
|
||||||
{
|
{
|
||||||
$model = objectPool(static::class);
|
/** @var static $model */
|
||||||
$model->setAttributes($data);
|
$model = objectPool(get_called_class());
|
||||||
|
$model->attributes = $data;
|
||||||
$model->setIsCreate(false);
|
$model->setIsCreate(false);
|
||||||
$model->refresh();
|
|
||||||
return $model;
|
return $model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user