Reputation: 47649
I have a very simple Play 2.1 Scala project. As in, this is the only code in it so far. I have a task which I am running with an Akka.system.scheduler
. I have some code to select from the database (currently the standard test H2 instance) and I'm following the documentation example almost exactly.
DB.withConnection { implicit c =>
Logger.info("2")
var x = SQL("insert into x (a, b, c) values ({a, b, c})").on(
'a -> a,
'b -> b,
'c -> c
)
Logger.info("2.5")
x.executeUpdate()
Logger.info("3")
It never gets past 2.5. I haven't got any other database operations happening (except for evolutions).
Help?
Upvotes: 1
Views: 293
Reputation: 13959
Based on your link, shouldn't your SQL statement look like:
var x = SQL("insert into x (a, b, c) values ({a}, {b}, {c})").on(
"a" -> a,
"b" -> b,
"c" -> c
)
In the question the values don't have individual braces: {a, b, c}
.
Upvotes: 1