Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7295

renameCollection wrapper accepts wrong arguments and fails silently

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 3.3.14
    • Affects Version/s: 2.0.6, 2.0.7
    • Component/s: Shell
    • Labels:
    • Environment:
      Linux
    • Fully Compatible
    • ALL
    • Platforms 2016-09-19

      Trying to use renameCollection, I mistakenly mixed the syntax of the renameCollection and the wrapper function db.collection.renameCollection().

      I typed > db.source-collection.renameCollection(

      { to : "target-collection", dropTarget : true }

      )

      And then, the "source-collection" disappeared, and a new one appeared and is listed as "[object Object]" with db.getCollectionNames().

      Apparently the collection was renamed after the first argument of the wrapper.

            Assignee:
            matt.cotter Matt Cotter
            Reporter:
            miagao Luciano Issoe
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: