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

collection.watch doesn't respect promoteLongs option

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Core
    • 3
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      What problem are you facing?

      collection.watch doesn't respect promoteLongs option therefore small Long values are always emitted as Numbers

      What driver and relevant dependency versions are you using?

      mongodb@4.3.1

      Steps to reproduce?

      1. call collection.watch with `

      { promoteLongs: false }

      ` options
      2. insert a document with `

      { long: Long.fromNumber(0) }

      ` to given collection
      3. observe that the document emitted by the change stream has `long = 0`

            Assignee:
            kwabena.ampofo@mongodb.com Kwabena Ampofo (Inactive)
            Reporter:
            adrian.gierakowski@deversifi.com Adrian Gierakowski
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None