Thanks for the info Jeff!  I do not have a deadline for having to switch to
iBATIS 3.0.  I can wait until the new version of Ibator is released and then
regen the mapper files.  I'll continue to study the dynamic SQL described in
iBATIS 3.0, when I have time.

Don Clary

> -----Original Message-----
> From: Jeff Butler [mailto:jeffgbut...@gmail.com]
> Sent: Friday, May 07, 2010 7:11 AM
> To: user-java@ibatis.apache.org
> Subject: Re: Converting ibator generated <iterate> clause in iBATIS 2 to
> iBATIS 3.0
>
>
> There's nothing automatic.  The easiest thing to do is regenerate the
> the code with the (as yet unreleased) new version of Ibator.  It's
> very easy to build with Maven - I'm just struggling to find time to
> deal with the all too cumbersome Apache release process.
>
> I've done some thinking about an ibatis2->ibatis3 XML conversion tool
> - but it's a very difficult thing to do because the dynamic SQL
> elements are very different.  There's no easy answer for that.
>
> Jeff Butler
>
>
>
>
> On Thu, May 6, 2010 at 11:56 PM, Don's Email
> <don.cl...@sbcglobal.net> wrote:
> > 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-unsubscr...@ibatis.apache.org
> > For additional commands, e-mail: user-java-h...@ibatis.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>


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

Reply via email to