From eb47b49174eee15432effdb928bafc01f09695d4 Mon Sep 17 00:00:00 2001 From: Andrey Kostin Date: Tue, 2 Jun 2020 08:11:46 +0400 Subject: [PATCH] Fixed ActiveFixture::load() doesn't populate data with _id --- CHANGELOG.md | 1 + src/ActiveFixture.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7672b201..72f92859e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Yii Framework 2 mongodb extension Change Log ------------------------ - Bug #308: Fix `yii\mongodb\file\Upload::addFile()` error when uploading file with readonly permissions (sparchatus) +- Bug #312: Fixed `yii\mongodb\ActiveFixture::load()` doesn't populate data with _id (Lisio) 2.1.9 November 19, 2019 diff --git a/src/ActiveFixture.php b/src/ActiveFixture.php index 55fd5d765..d49c1fa43 100644 --- a/src/ActiveFixture.php +++ b/src/ActiveFixture.php @@ -64,7 +64,7 @@ public function load() if (empty($data)) { return; } - $this->getCollection()->batchInsert($data); + $data = $this->getCollection()->batchInsert($data); foreach ($data as $alias => $row) { $this->data[$alias] = $row; }