ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Poitras Christian <Christian.Poit...@ircm.qc.ca>
Subject RE: iterate not working
Date Mon, 14 Dec 2009 14:25:58 GMT
The remove first prepend is intended to remove the first prepend of a sub-condition.
For exemple:
    <iterate prepend="," removeFirstPrepend="true"  property="name">
      <isNotNull prepend="removeMe" property="name[]">
           substr(upper(#name[].firstName#),1,1)||upper(#name[].lastName#)
      </isNotNull>
    </iterate>

What you want is:
    <iterate separator=","  property="name">
           substr(upper(#name[].firstName#),1,1)||upper(#name[].lastName#)
    </iterate>

Christian

-----Original Message-----
From: Trenton D. Adams [mailto:trenta@athabascau.ca] 
Sent: Friday, December 11, 2009 6:32 PM
To: user-java
Subject: iterate not working

Hi Guys,

I am using 2.3.0.

I'm wondering why this does not work...
           IN (
    <iterate prepend="," removeFirstPrepend="true"  property="name">
           substr(upper(#name[].firstName#),1,1)||upper(#name[].lastName#)
    </iterate>
              )

But this does...
           IN (''
    <iterate prepend=","  property="name">
           substr(upper(#name[].firstName#),1,1)||upper(#name[].lastName#)
    </iterate>
              )


Trenton D. Adams
Systems Analyst/Web Software Engineer
Navy Penguins at your service!
Athabasca University
(780) 675-6195
:wq!

__ 
    This communication is intended for the use of the recipient to whom it
    is addressed, and may contain confidential, personal, and or privileged
    information. Please contact us immediately if you are not the intended
    recipient of this communication, and do not copy, distribute, or take
    action relying on it. Any communications received in error, or
    subsequent reply, should be deleted or destroyed.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message