Assertion failed on update()

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.0.7
    • Component/s: Shell, Usability
    • None
    • Environment:
      Windows XP Professional, Service Pack 3, 32-bit
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Assertion is received when update() is not supplied any parameters. This should be an error instead.

      Here is an example in mongo shell:
      > d
      pcat.products
      > d.update()
      assert failed : need a query
      Error("Printing Stack Trace")@:0
      ()@shell/utils.js:35
      ("assert failed : need a query")@shell/utils.js:46
      (undefined,"need a query")@shell/utils.js:54
      ()@shell/collection.js:188
      @(shell):1

      Wed Oct 31 00:41:29 uncaught exception: assert failed : need a query
      > db.getLastError()
      null
      > db.getLastErrorObj()

      { "n" : 0, "connectionId" : 4, "err" : null, "ok" : 1 }

      >

            Assignee:
            David Hows (Inactive)
            Reporter:
            dabest1
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: