View difference between Paste ID: UpPPmPeU and wWhUi71q
SHOW: | | - or go back to the newest paste.
1-
package quickstart.models.test
1+
2
  trait SMongoDB {
3-
import quickstart.model._
3+
4-
import com.mongodb.casbah.Imports._
4+
5
6-
import scalaz._
6+
  /*
7-
import Scalaz._
7+
   * Neeeded an implicit from MongoCollection to SMongoCollection
8
   */
9
  def getCollection(collection:String*):SMongoCollection = try {
10
      success((this(collection(1))))
11
    } catch {
12
      case ex => failure(ex.getMessage)
13
    }
14-
    override def getCollection(collection:String):SMongoCollection = try {
14+
15-
      success((this(collection)))
15+
16
//  implicit def toSMongoCollection(col:MongoCollection):Validation[String,MongoCollection] =
17
18
  implicit def toSMongoDB(db:MongoDB) = new MongoDB(db.underlying) with SMongoDB
19
}