ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <bharathi.m...@accenture.com>
Subject RE: Collection as argument to stored procedure
Date Thu, 23 Aug 2007 07:03:09 GMT


<parameterMap id="input" class="emp">

        <parameter property="id" jdbcType="NUMBER"
javaType="java.lang.Integer" mode="IN" />

                <parameter property="name" jdbcType="VARCHAR"
javaType="java.lang.String" mode="IN" />

  </parameterMap>

    <procedure id="iterate" parameterMap="input">
      call iterate(
	    <iterate property="inputList" open="(" close=")"
               conjunction="OR">
                #inputList[].id, #inputList[].name
            </iterate>
            )
    </procedure>
Can you please tell me the correct way to use iterate tag? Have tried
this.... (My procedure accepts a collection(inputList) of emp BOs) But
it doesn't work. Any help would be great.

Thanks 
Bharathi



-----Original Message-----
From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf
Of Larry Meadors
Sent: Wednesday, August 22, 2007 7:53 PM
To: user-java@ibatis.apache.org
Subject: Re: Collection as argument to stored procedure

Not really, no - Java collections are not JDBC types, so you have to
do some of the leg work.

Look at batching and the iterate tag, they'll help you get this going.

Larry


On 8/22/07, bharathi.mani@accenture.com <bharathi.mani@accenture.com>
wrote:
>
> Hi,
>
> Is it possible to pass a Collection of business Objects to stored
procedure
> through iBatis? How do we do the mapping in iBatis xml file?
>
> Can anyone please help me in this?


This message is for the designated recipient only and may contain privileged, proprietary,
or otherwise private information.  If you have received it in error, please notify the sender
immediately and delete the original.  Any other use of the email by you is prohibited.

Mime
View raw message