Add ability to preserve newlines within statement bodies.
---------------------------------------------------------

         Key: IBATISNET-23
         URL: http://issues.apache.org/jira/browse/IBATISNET-23
     Project: iBatis for .NET
        Type: New Feature
    Versions: DataMaper 1.5, DataMapper 1.1    
 Environment: .NET Framework 1.1
    Reporter: Kit Cragin
    Priority: Minor


The following examples do not result in the correct SQL command being sent to 
the database:

1. Database comments (e.g. "--") interleaved with SQL text.

<delete id="deletesomething">
-- Delete children
delete from thattable where thisid = #value#
-- Delete parent
delete from thistable where thisid = #value#
</delete>

The reason is that new lines are removed so you end up with this SQL command: 
"-- Delete children delete from thattable where thisid = @value -- Delete 
parent delete from thistable where thisid = @value".

2. Interleaved XML comments:

<delete id="deletesomething">
<!-- Delete children -->
delete from thattable where thisid = #value#
<!-- Delete parent -->
delete from thistable where thisid = #value#
</delete>

This doesn't work because newlines are removed and the statements are 
concatenated without any whitespace in between: "delete from thattable where 
thisid = @valuedelete from thistable where thisid = @value"

A feature in which new lines are preserved in a multiline statement would allow 
the correct SQL command to be sent to the server.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to