Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-1855

Unable to get "updatedExisting" flag in Mongoid.database.command({getlasterror: 1})

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      I tired to update a record using save!. Mongodb_optimistic gem uses save and then update. Following is the output and still no updateExisting flag..
      Please let me know if you need any other information.

      MONGODB leaderboard_development['leaderboards'].update(

      {"_id"=>BSON::ObjectId('4f3b08387877a646d400001e'), "_lock_version"=>1}

      , {"$set"=>{"_lock_version"=>2}})
      MONGODB user_store_development['$cmd'].find({:getlasterror=>1}).limit(-1)
      lockable.rb:42: result

      {"n"=>0, "connectionId"=>950283, "err"=>nil, "ok"=>1.0}

            Assignee:
            Unassigned Unassigned
            Reporter:
            Bhuvan2011 Bhuvan2011 [X]
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: