Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1040

Bulk operations: replace_one, update_one, update_many, bulk_write...

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • 12_01_17
    • Affects Version/s: 2.1.0
    • Component/s: Docs
    • Labels:
      None

      For each of the bulk operations documentation appears
      that "filter" in wrapping the "find"...
      For Example:
      {
      :update_one => {
      :filter => { :find => { :x => 1 }},
      :update => { '$set' => { :x => 2 } },
      :upsert => true } # upsert is optional and defaults to false
      }
      which insert produces that "find" is written as part of the document
      I think that the right way should be this one

      {
      :update_one => {
      :filter => { :x => 1 },
      :update => { '$set' => { :x => 2 } },
      :upsert => true } # upsert is optional and defaults to false
      }

      I hope it helps

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            dev@theneura.com Developer Neura
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: