playframework/playframework — pull request #3483 by cchantep (2014-10-08 12:35:06+00:00)
Title: anorm causes queries with comments to be invalid

Anorm's SqlStatementParser.parse function causes bugs, or worse, silent failures. It does this by stripping newlines, which can cause a valid sql statements to be truncated at the first comment.
```
select
1
--some comment
, 2
```
The above will silently cause a bug. This is because after parse() transforms the query, it becomes

```
select 1 --some comment , 2
```
which return a result set with one column instead of two.

Comments inside of queries are used heavily in code that creates triggers, functions, and so on. As a temporary fix I'm removing comments from generated code, but that's not the ideal situation.

Jeff