2017-03-12 161 views
1

我使用jooq與play2.5和Scala應用程序Jooq postgre插入錯誤與play2.5斯卡拉

當我插入一個簡單的查詢司機準備查詢與`周圍表名和字段名和postgres響應一個錯誤,我怎麼能克服這一點,可能有一個驅動程序參數來設置此行爲?

我使用

的SBT配置

libraryDependencies ++= Seq(
    jdbc, 
    cache, 
    ws, 
    evolutions, 
    filters, 
    "org.scalatestplus.play" %% "scalatestplus-play" % "1.5.0-RC1" % Test, 
    "org.postgresql" % "postgresql" % "9.2-1003-jdbc4", 
    "org.jooq" % "jooq" % "3.7.0", 
    "org.jooq" % "jooq-codegen-maven" % "3.7.0", 
    "org.jooq" % "jooq-meta" % "3.7.0", 
    "joda-time" % "joda-time" % "2.7", 
    "com.adrianhurt" %% "play-bootstrap" % "1.1-P25-B3", 
    "org.mindrot" % "jbcrypt" % "0.3m" 
) 

錯誤:

[debug] 2017-03-12 11:18:52,042 o.j.t.LoggerListener - Executing query   : insert into `public`.`user_account` (`nickname`, `email`, `password`, `role`) values (?, ?, ?, ?) 
[debug] 2017-03-12 11:18:52,043 o.j.t.LoggerListener - -> with bind values  : insert into `public`.`user_account` (`nickname`, `email`, `password`, `role`) values ('', '[email protected]', 'nomis05', 'ROLE_USER') 
[error] 2017-03-12 11:18:52,139 o.j.StatementLogger - insert into `public`.`user_account` (`nickname`, `email`, `password`, `role`) values ('', '[email protected]', 'kjhkh', 'ROLE_USER'); 
throws exception: org.postgresql.util.PSQLException: ERROR: syntax error at or near "`" 
    Position: 13 
org.postgresql.util.PSQLException: ERROR: syntax error at or near "`" 
    Position: 13 

回答