WithCollection

import scala.concurrent.Future

import reactivemongo.api.DB

import reactivemongo.api.bson.collection.BSONCollection
import play.modules.reactivemongo.WithCollection

class MyComponent(
 val collectionName: String) extends WithCollection[BSONCollection] {
 def database: Future[DB] = ???
}
class Object
trait Matchable
class Any

Value members

Abstract methods

The name of the collection

The name of the collection

Database asynchronous reference

Database asynchronous reference

Concrete methods

final def collection(implicit ec: ExecutionContext, cp: CollectionProducer[C]): Future[C]

Resolve a reference to the collection specified by its name.

Resolve a reference to the collection specified by its name.