hello
thx for ur answer.
I did not althought understood all this code :
**********************************************
trait MongoGridFSStorage extends Storage { self =>
import com.mongodb.casbah.Imports._
import com.mongodb.casbah.gridfs.Imports._
val cloudEnvironment = new CloudEnvironment()
val mongoServices = cloudEnvironment.getServiceInfos(classOf[MongoServiceInfo])
lazy val mongo = mongoServices.asScala.toList match {
&nbs
p; case head :: _ => {
val mongodb = MongoConnection(head.getHost(), head.getPort())(head.getDatabase())
mongodb.authenticate(head.getUserName(),head.getPassword())
mongodb
}
case _ => {
if(mongodb.authenticate("scalany","N8HANISMYHERO"))
mongodb
else throw new IllegalArgumentException("DEATH AND DESTRUCTION! PASSWORD FAILURE!")
}
}
*********************************************
what does mean the second part (case _)?What are the parameters of "val mongodb = MongoConnection(...)" and "mongodb.authenticate(....)" mean?
to my point of view, I only need to obtain the ids like in "case head ::..." but I don't know what to put in the second part of the program.
olivier
Le 23/10/12 00:10, Jennifer Hickey a
écrit :