Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-92

BsonCollection.InsertBatch(new[] { new BsonDocument{ {_id:-1} } }) fails

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.9
    • Affects Version/s: 0.7
    • Component/s: None
    • None
    • Environment:
      windows 7, x64. vs2008sp1. .net 3.5
    • Major Change

      calling

      var data = new[] {
      new BsonDocument() { {_id:-1} }
      };
      BsonCollection col = ....
      var safe = SafeMode.WaitForReplications(2, TimeSpan.FromSeconds(2));
      col.InsertBatch(data, safe);

      will throw:
      MongoDB.Bson.BsonSerializationException : No idGenerator found for type: System.Int32

      This used to work on version 0.5 with my own object CRUD test.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            hnguye8 huy nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: