You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This throws an exception for me on Windows 7 64bit, using mongo version 3.0.1 64bit, Vibe 0.7.23:
import std.stdio;
import vibe.d;
MongoClient client;
void test()
{
auto coll = client.getCollection("test.collection");
auto n = coll.count(["_id": Bson(0)]);
writeln(n);
}
shared static this()
{
client = connectMongoDB("127.0.0.1");
test();
}
object.Exception@C:\Users\cal\AppData\Roaming\dub\packages\vibe-d-0.7.23\source\vibe\data\bson.d(611): BSON value is type 'int_', expected to be one of [double_]
What is the right fix for this? Presumably this works for most people.
The text was updated successfully, but these errors were encountered:
They changed some field types from double to int for MongoDB 3.x. Probably the best idea would be to generally implement implicit conversions for handling all MongoDB replies similar to what JavaScript would do.
This throws an exception for me on Windows 7 64bit, using mongo version 3.0.1 64bit, Vibe 0.7.23:
What is the right fix for this? Presumably this works for most people.
The text was updated successfully, but these errors were encountered: