我是一個新的Slick用戶,我對錶的「*」方法有問題。我不明白。下面的代碼: 包款無法獲得光滑表的「*」方法
import slick.lifted.{ProvenShape, ForeignKeyQuery}
import slick.driver.PostgresDriver.api._
import scala.concurrent.ExecutionContext.Implicits.global
case class Coordonnee (id:Option[Long],
email:String,email_publique:Boolean,email_publique_assoc:Boolean,
rue:String,rue_publique:Boolean,rue_publique_assoc:Boolean,
codepostal:String,codepostal_publique:Boolean,codepostal_publique_assoc:Boolean,
ville:String,ville_publique:Boolean,ville_publique_assoc:Boolean,
phone:String,phone_publique:Boolean,phone_publique_assoc:Boolean,
phonemaison:String,phonemaison_publique:Boolean,phonemaison_publique_assoc:Boolean
)
class Coordonnees(tag:Tag) extends extends Table[Coordonnee](tag, "COORDONNEES"){
def id = column[Long]("COORDONNEES_ID", O.AutoInc, O.PrimaryKey)
def email = column[String]("EMAIL")
def email_publique = column[Boolean]("EMAIL_PUBLIQUE")
def email_publique_assoc = column[Boolean]("EMAIL_PUBLIQUE_ASSOC")
def rue = column[String]("RUE")
def rue_publique = column[Boolean]("RUE_PUBLIQUE")
def rue_publique_assoc = column[Boolean]("RUE_PUBLIQUE_ASSOC")
def codepostal = column[String]("CODEPOSTAL")
def codepostal_publique = column[Boolean]("CODEPOSTAL_PUBLIQUE")
def codepostal_publique_assoc = column[Boolean]("CODEPOSTAL_PUBLIQUE_ASSOC")
def ville = column[String]("VILLE")
def ville_publique = column[Boolean]("VILLE_PUBLIQUE")
def ville_publique_assoc = column[Boolean]("VILLE_PUBLIQUE_ASSOC")
def phone = column[String]("PHONE")
def phone_publique = column[Boolean]("PHONE_PUBLIQUE")
def phone_publique_assoc = column[Boolean]("PHONE_PUBLIQUE_ASSOC")
def phonemaison = column[String]("PHONEMAISON")
def phonemaison_publique = column[Boolean]("PHONEMAISON_PUBLIQUE")
def phonemaison_publique_assoc = column[Boolean]("PHONEMAISON_PUBLIQUE_ASSOC")
def * : ProvenShape[(Long,
String,Boolean,Boolean,
String, Boolean,Boolean,
String,Boolean,Boolean,
String,Boolean,Boolean,
String,Boolean,Boolean,
String,Boolean,Boolean)]=
(id,
email, email_publique, email_publique_assoc,
rue,rue_publique,rue_publique_assoc,
codepostal,codepostal_publique, codepostal_publique_assoc,
ville,ville_publique,ville_publique_assoc,
phone,phone_publique,phone_publique_assoc,
phonemaison,phonemaison_publique,phonemaison_publique_assoc
) <> (Coordonnee.tupled, Coordonnee.unapply)
}
的理念IDE中的錯誤是:
Error:Play 2 Compiler: Required level: slick.lifted.FlatShapeLevel Source type: (slick.lifted.Rep[Long], slick.lifted.Rep[String], slick.lifted.Rep[Boolean], slick.lifted.Rep[Boolean], slick.lifted.Rep[String], slick.lifted.Rep[Boolean], slick.lifted.Rep[Boolean], slick.lifted.Rep[String], slick.lifted.Rep[Boolean], slick.lifted.Rep[Boolean], slick.lifted.Rep[String], slick.lifted.Rep[Boolean], slick.lifted.Rep[Boolean], slick.lifted.Rep[String], slick.lifted.Rep[Boolean], slick.lifted.Rep[Boolean], slick.lifted.Rep[String], slick.lifted.Rep[Boolean], slick.lifted.Rep[Boolean]) Unpacked type: (Option[Long], String, Boolean, Boolean, String, Boolean, Boolean, String, Boolean, Boolean, String, Boolean, Boolean, String, Boolean, Boolean, String, Boolean, Boolean)
我使用油滑V3.1.1。如果我刪除
<> (Coordonnee.tupled, Coordonnee.unapply)
它的工作原理,但我需要它。
第一編輯:修改 「延伸表[......」 由pamu
謝謝你的提示。但是這並不能解決我的問題。 – f7h
@ f7h ...編輯答案..請立即檢查 – pamu
看看'sbt compile'是否先運行。 Intellij不是最終的答案。 – Reactormonk