map_reduce :out parameter does not accept :db

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.6.0
    • Affects Version/s: 1.5.2
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When running a mapreduce that looks like this:
      coll.mapreduce(map('uuid'), reduce, {:out => { :replace => scratch, 'db' => 'dp'},
      :query => {:uuid => r}.merge(ts)})

      I get this:
      /Users/nacuff/.rvm/gems/ruby-1.9.2-p180/gems/mongo-1.5.1/lib/mongo/collection.rb:64:in `initialize': new_name must be a string or symbol (TypeError)
      from /Users/nacuff/.rvm/gems/ruby-1.9.2-p180/gems/mongo-1.5.1/lib/mongo/db.rb:314:in `new'
      from /Users/nacuff/.rvm/gems/ruby-1.9.2-p180/gems/mongo-1.5.1/lib/mongo/db.rb:314:in `collection'
      from /Users/nacuff/.rvm/gems/ruby-1.9.2-p180/gems/mongo-1.5.1/lib/mongo/collection.rb:627:in `map_reduce'

      removing the 'db' (or :db) key makes it work just fine.

              Assignee:
              Tyler Brock (Inactive)
              Reporter:
              Nathan Acuff
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: