我有以下问题:
case class User(id: String, name: String, value: Any, userId: String)
我想创建用户表。
class Users(tag: Tag) extends Table[User](tag, "USERS"){
def id = column[String]("ID", O.PrimaryKey, O.AutoInc)
def name = column[String]("NAME")
def value = column[Any]("VALUE")
def userId = column[String]("USER_ID")
// Every table needs a * projection with the same type as the table's type parameter
def * = (id.?, name, value, userId) <> (Fact.tupled, Fact.unapply _)
}
但是我收到了一个错误:
could not find implicit value for parameter tt: slick.ast.TypedType[Any]
Not enought arguments for method column:(implicit slick.ast.TypedType[Any])slick.lifted.Rep[Any]
我认为我不能在光滑中定义Any作为列类型或者情况有所不同?