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

Type mismatch with JenaModul and RecordBinder #306

Open
GordianDziwis opened this issue Dec 3, 2015 · 0 comments
Open

Type mismatch with JenaModul and RecordBinder #306

GordianDziwis opened this issue Dec 3, 2015 · 0 comments

Comments

@GordianDziwis
Copy link

Hi,

did I screw up, or is this a issue? This is my model:

case class Person(name: String, nickname: Option[String] = None) {
}

object Person {
  import ops._
  import recordBinder._

  val clazz = URI("http://example.com/Person#class")
  implicit val classUris = classUrisFor[Person](clazz)

  val name = property[String](foaf.name)
  val nickname = optional[String](foaf("nickname"))

  implicit val container = URI("http://example.com/persons/")
  implicit val binder = pgb[Person](name, nickname)(Person.apply, Person.unapply)
  implicit val userFormat = Json.format[Person]
}

It works when I bind Jena like this:

trait Config {  
  implicit val ops: RDFOps[Rdf] = Jena.ops
  implicit val recordBinder: RecordBinder[Rdf] = Jena.recordBinder
}

But when I extend from the JenaModule I get this Message:

Error:(16, 49) type mismatch;
 found   : models.Person.clazz.type (with underlying type RDFOpsModule.this.Rdf#URI)
 required: RecordBinderModule.this.Rdf#URI
 Note: implicit value classUris is not applicable here because it comes after the application point and it lacks an explicit result type
  implicit val classUris = classUrisFor[Person](clazz)
                                                ^

Thanks a lot

Gordian

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

1 participant