-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.9.0
-
Component/s: None
-
None
-
Environment:Mac OSX, Linux
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.