ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashmi Dixit" <rash...@gmail.com>
Subject RE: help problem with select request using 'in' where clause
Date Thu, 27 Jul 2006 13:53:11 GMT
Hi Jeremy,

 

I am afraid its not going to be so simple :-)

 

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:jeremy.jardin@newtec.caisse-epargne.fr] 
Sent: Thursday, July 27, 2006 7:20 PM
To: user-java@ibatis.apache.org
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


Mime
View raw message