Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1839

EnumRepresentationConvention should apply to nullable enums

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.1
    • Affects Version/s: 2.0
    • Component/s: Serialization
    • None

      The EnumRepresentationConvention does not currently apply to nullable enums.

      i.e. nullable enums are persisted using integer values even when the EnumRepresentationConvention is applied.

      EnumRepresentationConvention should apply to nullable enums.

      This is a slight backward breaking change in that the serialization format of nullable enums might change when using this convention. That won't be a problem for round tripping because the Deserialize method accepts either integers or strings, but must be taken into account if writing queries against the nullable enum field.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            mattwhetton Matthew Whetton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: