I have objects with 3 string fields Country, province, city. They can contain zero or some string name.
I want to query all the data with the same values.
For example, I need all the data where
City = null, Province = "WA", Country = "USA"
I created a BsonDocument:
var lookup = new QueryDocument { {"GeoPosition.City", userLocation.City}, {"GeoPosition.Province", userLocation.Province}, {"GeoPosition.Country", userLocation.Country} };
But an empty field was thrown away and the document looked like this:
{ "GeoPosition.Province" : "WA", "GeoPosition.Country" : "USA" }
If I try to use
Query.EQ("GeoPosition.City", userLocation.City)
I have an exception saying that the parameter cannot be null.
As I see in the documentation, there is no problem building a cheking request if the value is null. So this is a problem with the C # driver. Any ideas how to solve this problem?
source share