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

options.promiseLibrary not passed from Db to Collection in createCollection()

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.40
    • Affects Version/s: 2.0.37
    • Component/s: None
    • Labels:

      I would expect the promiseLibrary to be specified once for the Db instance, and then passed down automatically, and that happens most of the time, except in this scenario:

      mongodb.MongoClient.connect("mongodb://localhost/test",

      { promiseLibrary: require('bluebird') }

      ).then(function(db)

      { return db.createCollection("test"); }

      ).then(function(col)

      { // This fails. assert(col.s.options.promiseLibrary); }

      );

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            nsabovic Nebojsa Sabovic
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: