I'm writing a Play/Scala application using Play 2.5.4 and ReactiveMongo. Based on this example, I'm getting the collection using
class SettingStore( val mongo:ReactiveMongoApi) {
def collection = mongo.db.collection[BSONCollection]("Settings")
// more code...
}
However, db
is now deprecated. The deprecation warning recommends I use database
, but this one returns a Future
so all operations have to be mapped over. Since ReactiveMongo's operations also return Future
s, this seems redundant... what's to proper way of getting a collection? (or, am I missing something completely and Future[Future[Future[A]]]
is the future?)