Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2587

Null property during serialization breaks deserialization with @BsonCreator

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.0
    • Affects Version/s: 3.5.0
    • Component/s: POJO
    • None

      If a POJO is saved with a field with a null value, it ends up not being serialized in the resulting Json, causing the deserialization to fail with a missing field exception:

      Could not construct new instance of: Candidate. Missing the following properties: [mothersName]

      In this case, my POJO has the property `mothersName` as `null`.

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            paulo_melo Paulo Melo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: