This commit is contained in:
2021-04-28 15:50:21 +08:00
parent 0c2a529910
commit 3a20af1d22
3 changed files with 5 additions and 21 deletions
+1 -5
View File
@@ -56,11 +56,7 @@ class CollectionIterator extends \ArrayIterator
*/
protected function newModel($current): ActiveRecord
{
$model = clone $this->model;
$model->setAttributes($current);
$model->setIsCreate(false);
$model->refresh();
return $model;
return $this->model::populate($current);
}