Open Rey8d01 opened 9 years ago
class QuerySet method update have next code
update_arguments = dict( spec=update_filters, document={'$set': definition}, multi=True, callback=self.handle_update_documents(callback) )
everything is ok, but it works only when I update collection (not document). if I update document execute method save and then _indexes_saved_beforesave - this code
self.coll(alias).update({'_id': document._id}, doc, callback=self.handle_update(document, callback))
may be better this code
self.coll(alias).update({'_id': document._id}, {"$set":doc}, callback=self.handle_update(document, callback))
like as update method.
Can you submit a Pull Request with a test that shows it working?
class QuerySet method update have next code
everything is ok, but it works only when I update collection (not document). if I update document execute method save and then _indexes_saved_beforesave - this code
may be better this code
like as update method.