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

forceServerObjectId is not considered during insertion

      version: 2.0.42

      >lib/collection.js
      -------insertMany function-line 435: options is not filled with forceServerObjectId property from collection properties . (we need to explicitly add it to insertMany query options)
      >>>> I fixed it by using self.s.db.options.forceServerObjectId instead of options.forceServerObjectId
      ------- insertDocuments function-line 613,: insertDocuments don't use forceServerObjectId option from collection properties.
      >>>> I fixed it by adding a condition on self.s.db.options.forceServerObjectId

      >lib/bulk/ordered.js
      -------OrderedBulkOperation.prototype.raw - line 325/328/334: don't use forceServerObjectId from collection properties
      >>>> I fixed it by using this.s.collection.s.db.options.forceServerObjectId!==true;
      -------OrderedBulkOperation.prototype.insert-line 353:don't use forceServerObjectId from collection properties
      >>>> I fixed it by using this.s.collection.s.db.options.forceServerObjectId!==true;

      >lib/bulk/unordered.js
      -------UnorderedBulkOperation.prototype.raw: line 374/377: don't use forceServerObjectId from collection properties
      >>>> I fixed it by using this.s.collection.s.db.options.forceServerObjectId!==true;
      -------UnorderedBulkOperation.prototype.insert: line 308: don't use forceServerObjectId from collection properties
      >>>> I fixed it by using this.s.collection.s.db.options.forceServerObjectId!==true;

        1. app.js
          1 kB
        2. collection.js
          103 kB
        3. ordered.js
          15 kB
        4. unordered.js
          15 kB

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            onegai guérin olivier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: