ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Morone, Bill" <Morone.B...@pennmutual.com>
Subject RE: lists as parameterClass
Date Thu, 20 Jul 2006 16:03:14 GMT
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-----
From: Brandon Goodin [mailto:brandon.goodin@gmail.com]
Sent: Thursday, July 20, 2006 8:35 AM
To: user-java@ibatis.apache.org
Subject: Re: lists as parameterClass


Yes, this should work.

<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 <  <mailto:Thomas.Schwaerzler@uibk.ac.at> Thomas.Schwaerzler@uibk.ac.at
> 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.  

Mime
View raw message