对于org.springframework.data.mongodb.core.query.Update这个类官方的描述是
Class to easily construct MongoDB update clauses.
大概的意思是说,这个类可以很容易构造出Mongodb的update语句。
该类下面的几个方法,也印证了这一点。
1、push(String key) 或 push(String key,Object value)
Update using $push
modifier.
就是说该方法其实是是用mongodb中的$push函数。
2、set(String key,Object value)
Update using the $set update modifier
同上,set方法调用的是mongodb中的$set函数。