Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1821

Different with $addToSet in NodeJS and Go drivers

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.4.4
    • Component/s: BSON
    • Labels:
      None
    • Environment:
      Linux

      There is a problem between the nodejs driver and the go driver with $addToSet, why would they be different when the company mongo is making them?

       

      The nodejs driver will replace the field in the document, the go driver will not.

       

      For example if you are using $addToSet on a field that has an existing string... the nodejs driver would replace it with an array and the go driver returns an error.

       

      That makes anyone who writes in node first have a problem with the interpretation of how the driver works.  Why would they be different?

            Assignee:
            Unassigned Unassigned
            Reporter:
            andrewhodel@gmail.com Andrew Hodel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: