ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don's Email" <don.cl...@sbcglobal.net>
Subject Converting ibator generated <iterate> clause in iBATIS 2 to iBATIS 3.0
Date Fri, 07 May 2010 04:56:10 GMT
I used ibator 1.2 to create the SQL mapper files for a project.  I am trying
to convert the mapper files to iBATIS 3.0, but am stuck on the <iterate>
tags.  Are there any examples available or a How to for converting mapper
files to iBATIS 3.0?

  <sql id="abatorgenerated_Example_Where_Clause">
    <!--
      WARNING - This element is automatically generated by Abator for
iBATIS, do not modify.
      This element was generated on Sat Oct 25 15:05:38 PDT 2008.
    -->
    <iterate conjunction="or" prepend="where" property="oredCriteria"
removeFirstPrepend="iterate">
      <isEqual compareValue="true" property="oredCriteria[].valid">
        (
        <iterate conjunction="and" prepend="and"
property="oredCriteria[].criteriaWithoutValue">
          $oredCriteria[].criteriaWithoutValue[]$
        </iterate>
        <iterate conjunction="and" prepend="and"
property="oredCriteria[].criteriaWithSingleValue">
          $oredCriteria[].criteriaWithSingleValue[].condition$
            #oredCriteria[].criteriaWithSingleValue[].value#
        </iterate>
        <iterate conjunction="and" prepend="and"
property="oredCriteria[].criteriaWithListValue">
          $oredCriteria[].criteriaWithListValue[].condition$
          <iterate close=")" conjunction="," open="("
property="oredCriteria[].criteriaWithListValue[].values">
            #oredCriteria[].criteriaWithListValue[].values[]#
          </iterate>
        </iterate>
        <iterate conjunction="and" prepend="and"
property="oredCriteria[].criteriaWithBetweenValue">
          $oredCriteria[].criteriaWithBetweenValue[].condition$
          #oredCriteria[].criteriaWithBetweenValue[].values[0]# and
          #oredCriteria[].criteriaWithBetweenValue[].values[1]#
        </iterate>
        )
      </isEqual>
    </iterate>
  </sql>

Thank you!

Don


---------------------------------------------------------------------
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