ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Nielsen ...@videone.dk>
Subject Re: Insert for Complex object
Date Tue, 11 Jan 2005 23:44:16 GMT
    Does anyone know how to iterate throug  inserts and updates ??
i havent seen it anywhere, and my schema requires this.. :(
maybe something like


<insert id="insertMany" parameterClass="class1">
    <iterate property="class2">
         #class1_key#, #class2.class2_key#   

is a join table for class1 and class2, with keys, class1_key class2_key

any ideas ??

-----Original Message-----
From: Larry Meadors <larry.meadors@gmail.com>
Sent: Tuesday, 11. Jan 2005 21:47 +0100
To: ibatis-user-java@incubator.apache.org
Subject: Re: Insert for Complex object

Why not just use a loop or some other iteration technique? You are
talking about saving 3-4 lines of code per instance, which is not
terribly significant, IMO.

On Tue, 11 Jan 2005 18:17:21 +0000 (UTC), ibatis-new-user
<shilpa.pradhan@judiciary.state.nj.us> wrote:
> Hi,
>    I understand that iBATIs 2.0.9 provides a simple way to map
ResultSet to
> Complex object. (e.g. Category has many Products
>                        and Products has Items)
> My question is, Can we do same thing for INSERT also??
> e.g. If I want to insert Category object using StoredProcedure, what
will be
> the simplest way to do it in iBATIs?
> can we write a ParameterMap for this kind of object mapping?
> any help is appreciated.
> Thanks,
> shilpa

View raw message