score:0

Accepted answer

I had similar problems when I migrated from an earlier version of ReactiveMongo. What worked for me was sprinkling around some .as[JsObject] conversions in the various calls to the ReactiveMongo API.

So if before I had:

 collection.update(
  selector,
  obj,
  ...
)

I replaced it with:

collection.update(
  selector,
  obj.as[JsObject],
  ...
)

This seemed to be sufficient, although I am supplying the necessary JSON converter(s) in a slightly different way to you; subclasses of my abstract class have to implement an implicit val fmt:Format[T] member. I doubt whether that is important, but it is an approach that seems to be working :-)

score:-1

You need to use OWrites and OFormat instead of Writes and Format. I know OWrites extends Writes and OFormat extends Format, but the reactivemongo version you are using is waiting for OWrites and OFormat, not its super types.


Related Query

More Query from same tag