FormatBSON.class requires handlers, which is available with reactivemongo 0.9
Opened this issue · 2 comments
tianjianfeng commented
Hi,
I am using reactivemongo 0.9. Following your example in the readme, I found problems below:
- BSONWriter BSONReader is not available in the handler's package.
- bad symbolic reference. A signature in FormatBSON.class refers to term handlers in package reactivemongo.bson which is not available. It may
be completely missing from the current classpath, or the version on the classpath might be incompatible with the version used when
compiling FormatBSON.class.
Thanks
edofic commented
from readme: NOTE this is useful for ReactiveMongo 0.8, 0.9 has different API and already contains these maros
however documentation is sparse, see ReactiveMongo 0.9 scaladoc.
macros are in reactivemongo.bson.Macros
edofic commented
first of all the userHandler should go into the companion object
case class User(firstname: String, ...)
object User {
implicit val userHandler = Macros.handler[User]
}
NoSuchElementException: None.get
is usually a symptom of a missing field. Are you sure your existing documents will pass through the userHandler?