在Play Framework中执行SQL查询时出错

时间:2014-11-24 15:45:33

标签: scala playframework h2 playframework-2.3 anorm

我在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()
  }
}
}

0 个答案:

没有答案
相关问题