This commit is contained in:
2021-04-23 10:28:11 +08:00
parent 8904df7dff
commit 011424b54b
2 changed files with 1 additions and 8 deletions
+1 -7
View File
@@ -57,13 +57,7 @@ class CollectionIterator extends \ArrayIterator
*/
protected function newModel($current): ActiveRecord
{
/** @var ActiveRecord|string $model */
$model = $this->model;
if (is_object($model)) {
$model = get_class($model);
}
$model = new $model();
return $model->setAttributes($current);
return $this->model::populate($current);
}