ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramon Luo (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATISNET-183) Prepend for delete doesn't work
Date Mon, 28 Aug 2006 08:29:24 GMT
Prepend for delete doesn't work

                 Key: IBATISNET-183
                 URL: http://issues.apache.org/jira/browse/IBATISNET-183
             Project: iBatis for .NET
          Issue Type: Bug
          Components: DataMapper
    Affects Versions: DataMapper 1.5.1
            Reporter: Ramon Luo

My database is MS Access. I use Visual Studio 2003. english version. 
I use following statement 
<delete id="Delete" parameterClass="Message">
	Delete from Message Where
	<isNotNull prepend="AND" property="Key">
		Key = #Key#
	<isNotNull prepend="AND" property="CID">
		CID = #CID#
	<isNotNull prepend="AND" property="Direction">
		Direction = #Direction#
	<isNotNull prepend="AND" property="Type">
		Type = #Type#
	<isNotNull prepend="AND" property="StartTime">
		StartTime = #StartTime#
	<isNotNull prepend="AND" property="EndTime">
		EndTime = #EndTime#
Then I create a Message object in my code, and call the SQL by mapper.Delete("Message.Delete",
I debug the code and found that the SQL statement is created as 
"Delete from Message Where AND Key = ? AND CID = ? AND Direction = ? AND Type = ? AND StartTime
= ? AND EndTime = ?"
I wondered why the "AND" before "Key = ?" appeared.

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
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message