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

MongoCollectionSettings.AssignIdOnInsert has no effect

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.2.2
    • Affects Version/s: 2.2, 2.2.1
    • Component/s: Operations
    • None

      According to the MongoDB documentation: "if the mongod receives a document to insert that does not contain an _id field, mongod will add the _id field that holds an ObjectId." Currently it is not possible to use this feautre of the mongod server, because the above mentioning option is not considered by the driver and ObjectId is always generated on collection insert.

      Note: Legacy versions of the driver still support this feature.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            kzanev Konstantin Zanev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: