from DONNEE
where<iterate open=" DONNE_UUID IN(" close=")" conjunction=",">#[]#</iterate>
Your select tag is as simple as
< select id = "selectFromDonneeUUID" resultMap = "abatorgenerated_DonneeResult" >
From your java code just send a list.
If you have other stuff in where clause then you need a dynamic around iterate.
Hi Jeremy,
I am afraid its not going to be so simple J
You will need to iterate over the list yourself and append the commas. You need to look up the iterate tag in iBATIS. In case you have problems, shout, will give you more help.
Regards
~Rashmi
From: jeremy jardin [mailto:[EMAIL PROTECTED] ]
Sent: Thursday, July 27, 2006 7:20 PM
To: [email protected]
Subject: help problem with select request using 'in' where clause
Hi,
I have to generate a request using 'in' where clause.
The request I have to launch is like this :
Select * from table where id in ('1', '2', '3');
But I don't what kind of parameter I should add.
This is my xml file :
< select id = "selectFromDonneeUUID" resultMap = "abatorgenerated_DonneeResult" parameterClass = "java.util.List" >
<!--
WARNING - This element is automatically generated by Abator for iBATIS, do not modify.
This element was generated on Wed Jul 12 09:28:22 CEST 2006.
-->
select DONNEE_UUID,
DESCRIPTION,
LIBELLE,
TYPAGE,
EVALUATEUR,
TSTMPINSR,
TSTMPUPDT
from DONNEE
where #DONNE_UUID# in (
</ select >
I've choosen to use "java.util.List" parameterClass but I don't really know what to use !
Thx
