<statement id="getPolicyList" parameterClass= "java.util.Map" resultClass="xml" xmlResultName="policy">
select acct.acct_id as policyid
from acct, client_acct
where
client_acct.client_id = #clientId#
and acct.acct_id = client_acct.acct_id
and client_acct.client_acct_role_cd in
<iterate open="(" close=")" conjunction="," property="clientRoles">
#clientRoles[]#
</iterate>
</statement>
How about this one? Please forgiv the "straight-to-xml"<statement id="getPolicyList" parameterClass= "java.util.Map" resultClass="xml" xmlResultName="policy">
select acct.acct_id as policyid
from acct, client_acct
where
client_acct.client_id = #clientId#
and acct.acct_id = client_acct.acct_id
and client_acct.client_acct_role_cd in
<iterate open="(" close=")" conjunction=",">
#clientRoles[]#
</iterate>
</statement>
-----Original Message-----Yes, this should work.
From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 20, 2006 8:35 AM
To: [email protected]
Subject: Re: lists as parameterClass
<select parameterClass="list">select * from odm_product where id IN<iterate
open=" ("#[]#
close=")" conjunction=",">
</iterate>
</select>
Brandon Goodin
On 7/20/06, Thomas Karl Schwaerzler < [EMAIL PROTECTED] > wrote:
hello,
i'd like to do a query that looks like:
select * from odm_product where id IN (1,2);
where i'd like to pass over a list of long values
as parameter ( java.lang.Long[] )
is there something like this posssible with ibatis?
greets
t.This message, including any attachments, is intended only for the recipient(s)
named above. It may contain confidential and privileged information. If you have
received this communication in error, please notify the sender immediately and
destroy or delete the original message. Also, please be aware that if you are not
the intended recipient, any review, disclosure, copying, distribution or any
action or reliance based on this message is prohibited by law.
