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

Support BsonDiscriminator for records

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Codecs, POJO
    • None
    • Java Drivers

      The driver supports the BsonDiscriminator annotation on POJOs, but doesn't do the same for Java records. This makes a certain amount of sense since records are not allowed to extend a base record like a POJO can for a base class. But records can implement common interfaces, so it does still make sense to discriminate between different record types that implement a common interface and are stored in the same collection.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: