playframework/playframework — pull request #3016 by cchantep (2014-06-10 19:59:05+00:00)
Title: Anorm BatchSql throws an error when executed since Play 2.3

After I updated to Play 2.3 my batch queries fail to execute with the following exception:

```
PSQLException: The column index is out of range: 1, number of columns: 0.
```

I prepared a simplified sample code to reproduce the error:
```
val paramList = Seq(Seq[NamedParameter]("minAge" -> 43, "maxHeight" -> 180), Seq[NamedParameter]("minAge" -> 37, "maxHeight" -> 195))
val query = BatchSql(SqlQuery("SELECT firstname, lastname FROM person WHERE age > {minAge} AND height < {maxHeight}", List("minAge", "maxHeight")), paramList)
query.execute()
```

In my opinion the issue is that the query parameters are not parsed and still in the form `{}` instead of `?` when the batch parameters are applied to the prepared statement. At least this is the difference I saw compared to a normal query.

See method `fill` in https://github.com/playframework/playframework/blob/30d6d8c12908603f044d0071af6c2b1a80cab222/framework/src/anorm/src/main/scala/anorm/BatchSql.scala#L116-135