You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org> on 2005/02/20 19:45:49 UTC
[jira] Closed: (IBATISNET-23) Add ability to preserve newlines within statement bodies.
[ http://issues.apache.org/jira/browse/IBATISNET-23?page=history ]
Gilles Bayon closed IBATISNET-23:
---------------------------------
Assign To: Gilles Bayon
Resolution: Fixed
Fix Version: DataMapper 1.2
Put ; on end of statement
<delete id="deletesomething">
-- Delete children
delete from thattable where thisid = #value#;
-- Delete parent
delete from thistable where thisid = #value#;
> </delete>
> 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
> Assignee: Gilles Bayon
> Priority: Minor
> Fix For: DataMapper 1.2
>
> 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