Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2144

cursor.clone does not work on 3.x

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.3.2, 3.7.0
    • Component/s: Core
    • Labels:
    • Environment:
      Window 10
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The following code will raise MongoError: no such command: 'lsid

      OS: Windows 10

      MongoDB Version: 4.0.10

      NodeJs Driver Version: 3.3.2

       

      // code placeholder
      const MongoClient = require('mongodb').MongoClient;
      const url = 'mongodb://localhost:27017';
      
      
      MongoClient.connect(url, async function(err, client) {
        assert.equal(null, err);
        const db = client.db("test");  
        const rst=await db.collection("testCollection").aggregate([]).clone().toArray(); //raise error, UnhandledPromiseRejectionWarning: MongoError: no such command: 'lsid     console.log(rst.length)  
      client.close();
      });
      
      

       

       

       

            Assignee:
            daria.pardue@mongodb.com Daria Pardue
            Reporter:
            qinghai@gmail.com Qing hai
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: