From 16bfb7670ef0310755e37cfe98cc8062740a9295 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 date with _id --- CHANGELOG.md | 2 +- src/ActiveFixture.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2d14a042..0feecf083 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Yii Framework 2 mongodb extension Change Log 2.1.10 under development ------------------------ -- no changes in this release. +- 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; }