I just upgraded our app from Play 2.3 to 2.4 (hence anorm 2.4.0) and discovered that a breaking change was made to the SQL string interpolator: percent signs are now parsed apparently as variable placeholders.
2.3.x:
scala> SQL"DATE_FORMAT(NOW(),'%m-%d-%Y')"
res0: anorm.SimpleSql[anorm.Row] = SimpleSql(SqlQuery(DATE_FORMAT(NOW(),'%m-%d-%Y'),List(),None),Map(),<function1>)
2.4.x:
scala> SQL"DATE_FORMAT(NOW(),'%m-%d-%Y')"
java.lang.RuntimeException: No parameter value for placeholder: 1
at scala.sys.package$.error(package.scala:27)
at anorm.TokenizedStatement$.tokenize(TokenizedStatement.scala:73)
at anorm.package$SqlStringInterpolation$.SQL$extension(package.scala:58)
... 42 elided
I didn't see this incompatible change mentioned in the Play 2.4 migration guide nor in the Anorm 2.4 highlights (nor the Anorm code or any Google results), and I haven't seen any documentation for what this syntax change enables that wasn't doable before.
Was this inadvertently changed somehow (should I file a bug?), or why was it changed in a backwards-incompatible way without warning or explanation of the benefits it provides?
This breaks a lot of SQL code for us and probably others.
thx,
Chris