findAndModify的一个更新
db.getCollection('cuishou_ids').findAndModify({ 'query':{ 'name':'user' }, 'update':{ $set:{$inc:{'id':1}} }, 'new':true, // 'upsert':true })
问题的原因是:
$set 和$inc不可以同时存在