Browse Source

use db.getSiblingDB('hello_world') because use hello_world does not always work correctly (does not work on windows 10) (#6731)

snowbldr 4 years ago
parent
commit
8d05f5ad54
1 changed files with 1 additions and 1 deletions
  1. 1 1
      toolset/databases/mongodb/create.js

+ 1 - 1
toolset/databases/mongodb/create.js

@@ -1,4 +1,4 @@
-use hello_world
+db = db.getSiblingDB('hello_world')
 db.world.drop()
 for (var i = 1; i <= 10000; i++) {
   db.world.save( { _id: i, id: i, randomNumber: Math.min(Math.floor(Math.random() * 10000) + 1, 10000) })