Does Mongoose support the Mongodb `findAndModify` method?
The feature is not well (read: at all) documented, but after reading through the source code, I came up with the following solution. Create your collection schema. var Counters = new Schema({ _id: String, next: Number }); Create a static method on the schema which will expose the findAndModify method of the model’s collection. Counters.statics.findAndModify … Read more