public function batchInsert($rows, $options = []) { $insertedIds = $this->database->createCommand()->batchInsert($this->name, $rows, $options); foreach ($rows as $key => $row) { $rows[$key]['_id'] = $insertedIds[$key]; } return $rows; }