1
我不能将值30添加到关键年龄我收到错误消息说:BasicBSONObject
类型中的方法put(String, Object)
不适用于参数(String, int)
。方法newDate
方法MongoDB中的BasicDBObject拒绝取值整数
BasicDBObject document = new BasicDBObject();
document.put("name", "baja");
document.put("age", 30);
document.put("createdDate", newDate());
table.insert(document);