rabin 1 year ago
parent
commit
33b79001db
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/Dever/Store/Mongo.php

+ 2 - 0
src/Dever/Store/Mongo.php

@@ -219,6 +219,8 @@ class Mongo extends Base
         //$insert['_id'] = new ObjectId();
         $bulk = new BulkWrite;
         $id = $bulk->insert($insert);
+        $id = (array) $id;
+        $id = $id['oid'];
         $result = $this->update->executeBulkWrite($this->db . '.' . $table, $bulk);
         if (Debug::$shell) {
             $this->log(array('table' => $this->db . '.' . $table, 'insert' => $insert, 'result' => $id));