ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugeny N Dzhurinsky <eugeny...@jdevelop.com>
Subject iterate over 2 collections
Date Wed, 03 Aug 2005 08:58:29 GMT
I have a query like this:

<statement id="dynamicGetRule" resultClass="com.greenvalley.TMS.MML.Entity.Rule">
      select distinct r.rule_id,r.name,r.description from rule r left join rule_field rf
      on r.rule_id = rf.rule_id
  <dynamic prepend=" WHERE ">
    <isNotNull prepend=" AND " property="name"> r.name like #name# </isNotNull>
    <isNotNull prepend=" OR " property="description"> r.description like #description#
</isNotNull>
    <isNotNull property="fields,values" >
    <iterate prepend="AND" property="fields,values"
                 open="(" close=")" conjunction="OR">
                    rf.name=#fields[]# and rf.value=values[]
                </iterate>
    </isNotNull>
</dynamic>
order by name limit #offset#,#limit#</statement>

so i'd like to use 2 collections with the same size and order to use.

Is it possible at all?

-- 
Eugene N Dzhurinsky

Mime
View raw message