Scala Slick - 无法找到双向映射运算符

时间:2016-06-29 20:45:19

标签: postgresql scala import slick

使用Slick版本3.1.1 [在此输入链接描述] [1]

[1]:http://slick.lightbend.com/download/我想创建一个映射到我的case class的投影。但是,我一直遇到的问题是无法找到双向映射的运算符。以下是对.sbt文件中定义的依赖项的快速浏览:

libraryDependencies ++= Seq(
  "com.typesafe.slick" %% "slick" % "3.1.1",
  "org.slf4j" % "slf4j-nop" % "1.6.4"
)

虽然我定义的案例类和表[T]派生如下:

import slick.driver.PostgresDriver._
import slick.lifted._

case class Log(created_at: String, file: String, line: String, systemName: String, systemVersion: String, networkStatus: Boolean, message: String)

class LogTable(tag: Tag) extends Table[Log](tag, "log") {
  def created_at = column[String]("created_at")
  def file = column[String]("file")
  def line = column[String]("line")
  def systemName = column[String]("systemName")
  def systemVersion = column[String]("systemVersion")
  def networkStatus = column[Boolean]("networkStatus")
  def message = column[String]("message")

  def * = (created_at, file, line, systemName, systemVersion, networkStatus, message) <> (LogKitIOS.tupled, LogKitIOS.unapply _)
}

有没有人知道为什么我无法使用<> operator

0 个答案:

没有答案