MongoDB java 怎么使用类似$substr的操作符
发布网友
发布时间:2022-04-07 23:09
我来回答
共1个回答
热心网友
时间:2022-04-08 00:39
BasicDBObject object1 = new BasicDBObject().apend("name","Tom");
BasicDBObject object2 = new BasicDBObject("$set", new BasicDBObject("age",20));
collection.update( object1 , object2 );