嗨,我刚刚更新并运行了简单的光滑表并想查询它。
import scala.slick.driver.PostgresDriver.simple._
import scala.slick.lifted.TableQuery
class Coffees(tag: Tag) extends Table[(String, Double)](tag, "COFFEES") {
def name = column[String]("COF_NAME", O.PrimaryKey)
def price = column[Double]("PRICE")
def * = (name, price)
}
val coffees = TableQuery[Coffees];
错误是:
[error] C:\testprojects\slickplay\app\model\Coffee.scala:11: expected class or o bject definition
[error] val coffees = TableQuery[Coffees];
TableQuery[Coffees] 不返回对象???如何修复它。