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

Allow FilterDefinition OfType to allow for querying of inherited types with type safety in builder

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.2.3
    • Read Operations

    Description

      The ability to use builders for typesafety with expressions is excellent, especially given our abundant use of the BsonClassMap to map field names, and occasionally change them.

      We would like the ability to do the following:

      Builders<RootType>.Filter.OfType<SubType>().ElemMatch(c => c.SomeThing, Builders<SubType>.Filter.Eq(c => c.SubTypeBoolean, true))

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            sallgeud Chad Kreimendahl
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: