find_and_modify does not return lastErrorObject

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 1.9.2
    • Affects Version/s: 1.9.0
    • Component/s: None
    • None
    • Environment:
      Mac OSX, Linux
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      http://docs.mongodb.org/manual/reference/command/findAndModify/
      The findAndModify command in mongo returns information in "lastErrorObject", such as "updatedExisting" and "upserted". It is useful information to have if it is to be determined what action the last findAndModify command took.
      However, the ruby driver does not return the lastErrorObject part of the response.
      https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/collection.rb
      http://api.mongodb.org/ruby/current/Mongo/Collection.html
      Currently, is there a way for a ruby client to obtain this information?
      The ruby implementation of find_and_modify should return the complete response, and not just the "value" part of it.

            Assignee:
            Brandon Black (Inactive)
            Reporter:
            Mayank Saraogi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: