coen-hyde/Shanty-Mongo — pull request #85 by tonymillion (2012-06-08 23:25:45+00:00)
Title: use findandmodify in update

This change uses findandmodify with returned object, so that the object in shanty matches the DB after Save()

currently if you call operations like inc() etc the object they are performed on becomes out of sync with the database after you call save(), often in a replica set you can't even read back the same object after a save as it may not have propagated to the other servers in the set.