You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Wolf-Dieter Mische <Mi...@gmx.at> on 2008/03/12 15:01:06 UTC

2 list entries to one row

Hello,

I have following problem. I habe a object holding a list A,B,C,D,E,... now I want to spore this list in a database. But I have to store them pairwise. For example:
Col1|Col2
A   |B
B   |C
....

Is there any possibility to solve this problem?


greetz
wolle
-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

Re: 2 list entries to one row

Posted by Jared Blitzstein <ma...@blitzstein.net>.
 From how I'm seeing it, that's two rows, not one. Before it gets to  
iBATIS, create an object representation of what you want to store and  
send a collection of those to your service. Then from there you can do  
a batch insert over an iteration of them. That's the simplest solution  
I can think of off the top of my head.

On Mar 12, 2008, at 10:01 AM, Wolf-Dieter Mische wrote:

> Hello,
>
> I have following problem. I habe a object holding a list  
> A,B,C,D,E,... now I want to spore this list in a database. But I  
> have to store them pairwise. For example:
> Col1|Col2
> A   |B
> B   |C
> ....
>
> Is there any possibility to solve this problem?
>
>
> greetz
> wolle
> -- 
> Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
> Browser-Versionen downloaden: http://www.gmx.net/de/go/browser