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

He found a bug into our C# drive and he came up with the solution

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      Email from client in Brazil: 

      @Catherina Zingg Guzman good morning,

       

      For context, sending you scenario that we developers in Supermercados BH we work with IMongoQueryable of MongoDB.Drive.Linq and typing our code with Lambda.

       

      The other partner that we use here are Convention and our conventions is settings of attached file ConfigurationEx.

       

      When we doing Project/Select of register of database using Typed Class the drive working and use Anonymous Type not working.

      The bug occurs because a field exists in project/selct which does not exist in document.

      When drive analyze the expression it not found the default value of field that not exists in document.

      If the driver found the default value the project/select will be work.

       

      This happen why Lambda expresstion is calling in MongoDB.Driver.Linq.Linq2Implementation.Processors. SerializerBuilder by method private BsonClassMap BuildClassMap(Type type, ProjectionMapping mapping) and here I compreend that AutoMap of

      BasonClassMap in MongoDB.Bson.Serialization is not calling.

       

      In the file SerializerBuilder in line 172 it is fix bug and call of AutoMap to drive working in the present scenario .

       

      Any questions I can do a POC.

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            catherina.hattingh@mongodb.com Catherina Hattingh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: