阅读背景:

使用Java从mongodb检索数组值

来源:互联网 

i have the following code :

我有以下代码:

DBCollection collsc = db.getCollection("StudentCourses") ;
BasicDBObject querysc = new BasicDBObject("StudentID",id ); 
DBCursor curssc = collsc.find(querysc);

while(curssc.hasNext()) {

    DBObject e = curssc.next();
    System.out.println("You are currently registered for the following modules: ") ; 
    System.out.println(e.get("CoursesRegistered")) ; 

}
DBColl



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: