ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James, Steven" <Steven.Ja...@logicacmg.com>
Subject RE: iterate over 2 collections
Date Wed, 03 Aug 2005 09:40:46 GMT
did you try it and what were the errors..  

________________________________

From: Eugeny N Dzhurinsky [mailto:eugenydzh@jdevelop.com]
Sent: Wed 03/08/2005 09:58
To: user-java@ibatis.apache.org
Subject: iterate over 2 collections



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




This e-mail and any attachment is for authorised use by the intended recipient(s) only. It
may contain proprietary material, confidential information and/or be subject to legal privilege.
It should not be copied, disclosed to, retained or used by, any other party. If you are not
an intended recipient then please promptly delete this e-mail and any attachment and all copies
and inform the sender. Thank you.

Mime
View raw message