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