我正在尝试使用 squeryl ORM 框架将用户名和加密密码对插入数据库表中。我的代码基本上如下所示:
class SHA1(e: StringExpression[String], m:OutMapper[String]) extends FunctionNode[String]("sha1", Some(m), Seq(e)) with StringExpression[String]
def sha1(e:StringExpression[String])(implicit m:OutMapper[String]) = new SHA1(e,m)
transaction{
val foo = TestUser.userTable insert User("test@domain.com", sha1("password"))
}
但这不起作用。我收到一条错误消息:
type mismatch; found : controllers.SHA1 required: String Error occurred in an application involving default arguments.