[ https://issues.apache.org/jira/browse/IBATIS-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620965#action_12620965 ]
Ondra Žižka commented on IBATIS-203: ------------------------------------ Hi, is there any solution that does not involve crippling SQL language? In my case, changing the -- comments to other type (actually, the only remaining is C-style /* */ ) would heavily reduce SQL readability. Can I "turn off" the newline thing somehow in iBatis settings? If not, hereby I suggest it :-) Thanks > Sql comments inside sqlMap's select tag, throws exception > --------------------------------------------------------- > > Key: IBATIS-203 > URL: https://issues.apache.org/jira/browse/IBATIS-203 > Project: iBatis for Java > Issue Type: Improvement > Components: SQL Maps > Affects Versions: 2.1.5 > Environment: WinXP > Reporter: Henrik Westman > > Using sql comments i.e. lines prepended with "--", causes an exception. > Seems like ibatis, parses the CDATA content of the select tag, > into one long line without any newlines. > ex. > <select> > <![CDATA[ > select * from myTable > -- here is my comment > where myCol = 5 > ]]> > </select> > gets parsed into > select * from myTable -- here is my comment where myCol = 5 > which is now invalid sql. > Not being able to comment is annoying > when you have very long SQL statements. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.