Hi,
In my 2.3.10 scala-based play application, i'm using "play2-reactivemongo" 0.10.5.0.akka23 and "reactivemongo-extensions-json" 0.10.5.0.0.akka23.
Now, I want to use 0.11.7.play23 stable version.
Is there a migration doc somewhere ?
Because I have now a lot of compilation error...
One of my lot of errors :
case class MyTest(_id: BSONObjectID = BSONObjectID.generate, someField: string)
object MyTest {
import play.api.libs.json.Json
import play.modules.reactivemongo.json.BSONFormats._
implicit val format = Json.format[MyTest]
def anthoreFormat = new Writes[MyTest] {
implict val overrideBSONObjectIDFormat = MyBSONObjectID.defaultWrite
def writes(obj: MyTest) = format.writes(obj) ++ Json.obj(
// Override to just return "_id" -> "stringify"
"_id" -> obj._id
)
}
}
object MyBSONObjectID {
def defaultWrite = new Writes[BSONObjectID] {
def writes(obj: BSONObjectID) = JsString(obj.stringify)
}
}
I have the following error
found : reactivemongo.bson.BSONObjectID
required: play.api.libs.json.Json.JsValueWrapper
"_id" -> obj._id
The implicit does not work anymore...
Any idea ?
Thanks !