Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-34882

Support creating instances with all required fields in IDL

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.4
    • None
    • Internal Code
    • None
    • Fully Compatible
    • Security 2018-09-10, Security 2018-09-24

    Description

      IDL enforces required fields to be present when serializing into BSON. However IDL is also used internally without serialization. Developers usually want to enforce all required fields are specified when creating an instance. Currently, we have functions to enforce them manually. OplogEntry is an example. Otherwise, we forgot some fields sometimes. It would be nice if the IDL can provide a way to enforce that. It could be either a constructor or a static factory function.

      Attachments

        Activity

          People

            mark.benvenuto@mongodb.com Mark Benvenuto
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: