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

cursor.clone does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 3.3.2
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      Window 10
    • MongoDB Version:
      4.0.10

      Description

      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();
      });
      
      

       

       

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            qinghai@gmail.com Qing hai
            Participants:
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: