I've created a custom generator to map my database into my app and I'm having an issue. I've customized it to generate the auto increment columns as optional, so I've made this:
val codegen = new scala.slick.model.codegen.SourceCodeGenerator(model) {
override def Table = new Table(_){
override def autoIncLastAsOption = true
}
}
For the tables that has more than 22 columns, it uses HList implementation and not the Scala Tuple. It is generating this:
implicit def GetResultVoicemailRow(implicit e0: GR[String], e1: GR[Short], e2: GR[java.sql.Timestamp], e3: GR[Option[Int]]): GR[VoicemailRow] = GR{
prs => import prs._
val positional = <<?[Int] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[Short] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[String] :: <<[java.sql.Timestamp] :: HNil
import positional._
r(1) :: r(2) :: r(3) :: r(4) :: r(5) :: r(6) :: r(7) :: r(8) :: r(9) :: r(10) :: r(11) :: r(12) :: r(13) :: r(14) :: r(15) :: r(16) :: r(17) :: r(18) :: r(19) :: r(20) :: r(21) :: r(22) :: r(23) :: r(24) :: r(0) :: HNil // putting AutoInc last
}
This is causing a compilation error. "not found: value r". What can I do to solve this? Thanks.