mongodb怎么插入多个文档
2 回答
12345678_0001
TA贡献1802条经验 获得超5个赞
1 2 3 4 5 6 7 8 9 10 11 12 | BasicDBObject document = new BasicDBObject(); document.put("database", "mkyongDB"); document.put("table", "hosting");
BasicDBObject documentDetail = new BasicDBObject(); documentDetail.put("records", "99"); documentDetail.put("index", "vps_index1"); documentDetail.put("active", "true");
document.put("detail", documentDetail);
collection.insert(document); |
- 2 回答
- 0 关注
- 1908 浏览
添加回答
举报
0/150
提交
取消