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

Add IHierarchicalDiscriminatorConvention and IScalarDiscriminatorConvention interfaces

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • 3.0.0
    • Affects Version/s: None
    • Component/s: LINQ3, Serialization
    • None
    • Fully Compatible
    • Dotnet Drivers
    • Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Might need documentation?

      Everything should work just as before, but I don't know if we want to document the two new interfaces in case people want to write their own discriminator conventions.

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to? Might need documentation? Everything should work just as before, but I don't know if we want to document the two new interfaces in case people want to write their own discriminator conventions.

      Adding these interfaces will allow the LINQ provider to create correct queries involving the `OfType` method or the `is` operator.

      A scalar discriminator stores a single scalar value in the `_t` field.

      A hierarchical discriminator stores an array of values representing the class hierarchy of the stored value relative to the root class.

      The two types of discriminators require different MQL to be generated by the LINQ provider.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: