假设我想update
对文档做一些简单的操作,e
如下所示:
print 'Updating:',e['title'],e['_id']
jp.update(e,{'$set':{'sensesJa':sensesJa,'last':'#pushFormsAndSetNewAtt'},
'$push':{'forms':{'$each':forms_to_push}}})
它确实打印了“更新:...”,但文档没有得到更新。任何想法?
更新:添加要点: https ://gist.github.com/actor2019/5876903#file-clip-mongodb-pymongo-update-didnt-work-py-L36