• Minor Change

      This is just to notify a breaking change, the regex find query has to change from .Eq to .Regex in order to work,

      In Driver 2.0.1 this works:

      var filter = new FilterDefinitionBuilder<MyModel>()
                          .Eq(
                              x => x.MyStringField,
                              new BsonRegularExpression("^mongo", "i")
                          );
      

      In Driver 2.1.0 the above example throws a Casting exception between String and Regex,

      Unable to cast object of type 'MongoDB.Bson.Serialization.Serializers.StringSerializer' to type 'MongoDB.Bson.Serialization.IBsonSerializer`1[MongoDB.Bson.BsonRegularExpression]'

      so I need to change to this:

      var filter = new FilterDefinitionBuilder<MyModel>()
                          .Regex(
                              x => x.MyStringField,
                              new BsonRegularExpression("^mongo", "i")
                          );
      

            Assignee:
            craig.wilson@mongodb.com Craig Wilson
            Reporter:
            amilcar Amilcar Calles
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: