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

MongoCollectionSettings.AssignIdOnInsert has no effect

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.2.2
    • 2.2, 2.2.1
    • Operations
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: