ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher.Mathru...@sybase.com
Subject removeFirstPrepend
Date Thu, 24 Apr 2008 00:04:28 GMT
I'm having some trouble with the syntax of removeFirstPrepend. I have a 
procedure that I am attempting to invoke and all of the parameters are 
optional. SO I've embedded the content within the dynamic tag as 
documented and specified on each conditional element 
removeFirstPrepend="true", but the first content that is included does not 
get its prepend character "," removed and the SQL is invalid.

What am I missing?
Thanks...

  <procedure id="listCustomer" parameterClass="Customer" resultMap=
"CustomerResult"> 
    { call ${listCustomer_sp}
      <dynamic open="(" close=")">
        <isNotEmpty property="customerNumber" prepend="," 
removeFirstPrepend="true">
          @CustomerNumber = 
#customerNumber,jdbcType=VARCHAR,javaType=java.lang.String,mode=IN#
        </isNotEmpty> 
        <isNotEmpty property="customerName" prepend="," removeFirstPrepend
="true">
          @CustomerName = 
#customerName,jdbcType=VARCHAR,javaType=java.lang.String,mode=IN#
        </isNotEmpty> 
        <isNotEmpty property="customerClass" prepend="," 
removeFirstPrepend="true">
          @CustomerClass = 
#customerClass,jdbcType=VARCHAR,javaType=java.lang.String,mode=IN#
        </isNotEmpty>
.....

 

Chris Mathrusse
christopher.mathrusse@sybase.com
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553
Mime
View raw message