0

I'm currently trying to define a slick schema as follows using play-framework 2.4.0-RC5 together with play-slick 1.0.0-RC3:

import java.sql.Date
import play.api.Play
import play.api.db.slick.{DatabaseConfigProvider, HasDatabaseConfig}
import slick.profile.RelationalProfile

class Dao extends HasDatabaseConfig[RelationalProfile] {
  protected val dbConfig = DatabaseConfigProvider.get[RelationalProfile](Play.current)

  import driver.api._

  private class Tab(tag: Tag) extends Table[(Int, Date)](tag, "tab") {
    def id = column[Int]("id", O.PrimaryKey)
    def createDate = column[Date]("create_date")
    def * = (id, createDate)
  }

  // ...dao methods
}

On compile time, scala fails with an error:

[error] Dao.scala:17: could not find implicit value for parameter tt: slick.ast.TypedType[java.sql.Date]
[error]     def createDate = column[Date]("create_date")

According to the slick docs, java.sql.Date should be supported out of the box, so what am I doing wrong here? Any help is greatly appreciated.

Roman
  • 5,651
  • 1
  • 30
  • 41

1 Answers1

0

Finally found a solution. Replacing import slick.profile.RelationalProfile with slick.driver.JdbcProfile did the trick for me.

Roman
  • 5,651
  • 1
  • 30
  • 41