scala - Slick Create Table -
i use next code create simple table in tutorial:
import scala.slick.driver.h2driver.simple._ import scala.slick._ import scala.slick.lifted.{provenshape, tablequery} object mymodels { case class person(id: option[long], name: string) class persons(tag: tag) extends table[person](tag, "persons") { def id = column[long]("id", o.primarykey, o.autoinc) def name = column[string]("name") def * = (id.?, name) <> (person.tupled, person.unapply) } lazy val sources = tablequery[persons] }
but when try compile get:
[error] bad symbolic reference. signature in package.class refers type compiletimeonly [error] in package scala.annotation not available. [error] may missing current classpath, or version on [error] classpath might incompatible version used when compiling package.class. [error] /home/user/example/src/main/scala/example/mymodels/mymodels.scala:16: reference method anytotoshapedvalue in trait implicits should not have survived past type checking, [error] should have been processed , eliminated during expansion of enclosing macro. [error] def * = (id.?, name) <> (person.tupled, person.unapply) [error] ^ [error] /home/user/example/src/main/scala/example/mymodels/mymodels.scala:16: reference method tupled in trait function2 should not have survived past type checking, [error] should have been processed , eliminated during expansion of enclosing macro. [error] def * = (id.?, name) <> (person.tupled, person.unapply) [error] ^ [error] /home/user/example/src/main/scala/example/mymodels/mymodels.scala:16: reference method tuple2shape in trait shapelowpriority2 should not have survived past type checking, [error] should have been processed , eliminated during expansion of enclosing macro. [error] def * = (id.?, name) <> (person.tupled, person.unapply) [error] ^ [error] 4 errors found [error] (compile:compile) compilation failed
why? , how fix it?
scala-2.10.4 , slick-2.1.0
Comments
Post a Comment