Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-376

Documentation for cloneCollection is incorrect

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual
    • None

    Description

      The documentation for the cloneCollection command (http://www.mongodb.org/display/DOCS/cloneCollection+Command) refers to <namespace> of the collection you are cloning. In usage however, you only specify the collection name. Specifying the fully qualified namespace for the collection will result in nothing being copied. This is because we prepend the current database name to the string given.

      For example: db.cloneCollection("localhost:27017", "test.some_collection") will try and clone the collection "test.test.some_collection".

      Attachments

        Activity

          People

            bgrabar Bob Grabar
            andre.defrere@mongodb.com Andre de Frere
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11 years, 28 weeks ago