Java RecordCodec not supporting "BsonDiscriminator"

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: BSON, Codecs
    • None
    • None
    • Java Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Java Record supports for interface implementation.

      Let say i have interface A

      record B implements A

      record C implements A

      Let say i have some type of collection like this: List<A>

      This list permit me to add B and C types of objects.

      The problem is when you try to convert this list to BSON using RecordCodec

      It throws Not supporting exception for BsonDiscriminator.

      BsonDiscriminator supporting records is essential for this situation otherwise it is requiring to manually implement this solution...

      Full Explanation

              Assignee:
              Unassigned
              Reporter:
              Eli Partsi
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: