ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicholoz Koka Kiknadze" <kikna...@gmail.com>
Subject Inserting lists
Date Thu, 29 May 2008 21:44:06 GMT
/* I apologize for re-posting this, but I think my previous post ended in
junk folders because I was using all-numeric mailbox */

Recently I found that I'm writing loops to insert lists of objects way too
often. I think it makes sense implementing methods like:

insertList("insertSingleSomeObject",List<SomeObject>)    (with
"insertSingleSomeObject" beeing sqlmap entry for inserting single object,
which I have to use in loops)
batchInsert("insertSingleSomeObject",List<SomeObject>)  (with batch size
configurable like row prefetch is)


Think it will make iBatis  more consistent: we have queryForList, i.e.
getting list of objects in a single line of code, so it's quite natural to
expect that one should be able to persist the list in a single call.

Wonder what others think about it.

Nicholoz Koka Kiknadze

View raw message