如果通常要删除数组,请使用以下命令:
BasicDBObject match = new BasicDBObject("_id", "1"); // to match your documentBasicDBObject update = new BasicDBObject("itemList", new BasicDBObject("itemID", "1"));coll.update(match, new BasicDBObject("$pull", update));
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)