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

Remove toObject prototype override feature from BSON

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • bson-5.0.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 2
    • Not Needed
    • Not Needed

      Use Case

      Currently the deserializer will look for a toObject method defined on the Decimal128 prototype and call it after decoding a Decimal128 BSON value. We should consider if this inconsistent transformation feature is worth maintaining vs users specifying a cursor.map function.

      User Impact

      Acceptance Criteria

      Implementation Requirements

      • Remove the logic that looks for a toObject function on the prototype of Decimal128.

      Testing Requirements

      • Change the test that asserts this transform behavior to one that would fail if the feature were to be added back.

      Documentation Requirements

      • Note the change in the major release.
        • NOTE: There is nothing we can annotate in our API docs to deprecate this behavior. Ensure we make note of the change in the migration guide / major version changes docs.

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: