Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FormatBSON.class requires handlers, which is available with reactivemongo 0.9 #1

Open
tianjianfeng opened this issue Aug 21, 2013 · 2 comments

Comments

@tianjianfeng
Copy link

Hi,

I am using reactivemongo 0.9. Following your example in the readme, I found problems below:

  1. BSONWriter BSONReader is not available in the handler's package.
  2. 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
Copy link
Owner

edofic commented Aug 21, 2013

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
Copy link
Owner

edofic commented Aug 22, 2013

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants