oh, yes, i want the batch mode :) thanks Christopher and Adam for your help :-)
On 9/25/07, Adam Zimowski <[EMAIL PROTECTED]> wrote: > > It sounds like what you really want to do is a batched update > (developer's guide pages 55-57). You don't need to pass in the array > or a list, you simply pass in a bean instance or a parameter map for a > single update. You start a batch inside a transaction, make your 1000 > updates, then you call execute batch. Example from dev guide: > > try { > sqlMap.startTransaction(); > sqlMap.startBatch(); > // … execute statements in between > int rowsUpdated = sqlMap.executeBatch(); //optional > sqlMap.commitTransaction(); > } finally { > sqlMap.endTransaction(); > } > > If you use something like Spring to do your transactions you may have > to do some abstract base classes to cover the boilerplate code, but > I'd keep things simple and get everything working in iBatis natively. > For all I know, you may want to use iBatis for entire DAO layer. > > Hope this helps. > -adam > > On 9/25/07, Christopher Lamey <[EMAIL PROTECTED]> wrote: > > Hello, > > > > Take a look at pages 49 and 50 of the developer's guide. It has > examples of > > what you're trying to do. > > > > http://ibatis.apache.org/docs/java/pdf/iBATIS-SqlMaps-2_en.pdf > > > > Cheers, > > Chris > > > > On 9/25/07 11:45 AM, "Felipe Maza" <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > > I'm trying send a array to ibatis for do multiple updates in a > sentence > > > > > > I read examples of <iterate> for List, but i don't know how apply to > my xml > > > > > > > > > > > > > > > for example, i have some users for update > > > > > > <update id="example" parameterClass="???"> > > > update users set user= ??? where id_user= ??? > > > </update> > > > > > > > > > > > > > > > other solution is do a bucle in the DAO, but i need do more 1000 > updates and > > > this system is more slow for the server and bbdd :( > > > > > > thanks. > > > > >