Closed CK-Yong closed 2 years ago
Consider the following document:
{ "strings": [ "foo", "bar" ] }
I expect to be able to query it with this:
strings:foo
But this results in the following query:
{ strings: {$elemMatch: {$eq: foo }}}
I expect it as follows:
{ strings: {$elemMatch: {$eq: "foo" }}}
So now it throws the following exception:
InvalidCastException: Unable to cast object of type 'MongoDB.Bson.Serialization.Serializers.StringSerializer' to type 'MongoDB.Bson.Serialization.IBsonSerializer`1[System.Object]'."
Consider the following document:
I expect to be able to query it with this:
But this results in the following query:
I expect it as follows:
So now it throws the following exception: