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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Unknown Unknown
    • 1.9.0, 1.8.5
    • None
    • None
    • None

    Description

      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.

       

       

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: