我在Play 2.3应用程序和h2-memory db中执行SQL查询时出现问题。
代码哪里有问题:
DB.withConnection { implicit c =>
Sql("").executeInsert()
}
错误(在InteliJ Sql中有红色标记)
anorm.Sql.type does not take parameters
有什么想法吗?
全班:
import play.api.Play.current
import play.api.db.DB
import anorm._
case class User(username: String, password: String) {
def save() = {
DB.withConnection { implicit c =>
SQL("").executeInsert()
}
}
}