I am new to MongoDb. I was trying to retreive data from the db. Here is part of my code:
dbc(TABLENAME).find ( MongoDBObject (UID -> uid)).toList.foreach {s =>
val Rollno = s.getAs[String](ROLL).getOrElse ("?")
Apparently ROLL is set as integer, and I keep on getting the error java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String Is there an easy solution to get it?