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

Unmarshalling null into a pointer field always creates a value if the type implements bson.Unmarshaler or bson.ValueUnmarshaler

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.9.0, 1.8.5
    • Affects Version/s: None
    • Component/s: None
    • None

      I'm not sure, but have the feeling that the following code should not allocate an object for the field "Baz" and instead set it to nil: https://go.dev/play/p/eRTWs2Y9sDe.

       

       

       

            Assignee:
            matt.dale@mongodb.com Matt Dale
            Reporter:
            joel.gaehwiler@gmail.com Joël Gähwiler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: