Thank you for the new version.
> There are no breaking changes in this release.
There is a breaking change. It is mentioned in "Change Log v1.4.1-Bson.txt":
BsonDocument.cs
changed SetDocumentId to assume Id is already of type BsonValue
Thus, when I call it with `int`, as I used to, then I get the exception:
Unable to cast object of type 'System.Int32' to type 'MongoDB.Bson.BsonValue'.
The method `SetDocumentId(object id)` is confusing now. It accepts `object id` but internally does:
var idBsonValue = (BsonValue)id;
This is unsafe and even not documented in code comments. Either this method should accept `BsonValue` or it should handle any suitable objects, as it did before.
Also, there is a bug.
\Driver\Builders\QueryBuilder.cs(1015):
public QueryConditionList In(IEnumerable<BsonValue> values)
It calls `if (values.Contains(null)) ...` with a null argument. At the same time in
\Bson\ObjectModel\BsonArray.cs(648):
public bool Contains(BsonValue value)
.. there is:
if (value == null)
{
throw new ArgumentNullException("value");
}
Thus, `In` seems to be always throwing an exception.
--To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-user/-/7wMPYYWPWVkJ.
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.