Thank you. One more vital question: How does one refer to a property of an
object in a list? Is there simply some kind of dot notation for
dereferencing? I have not found any examples of this.
-----Original Message-----
From: Clinton Begin [mailto:clinton.begin@xxxxxxxxx]
Sent: Tuesday, December 28, 2004 12:44 PM
To: ibatis-user-java@xxxxxxxxxxxxxxxxxxxx
Subject: Re: Update on a list of POJOs -- what's the best approach?
Hi Karen,
> Is my best bet in writing the statement itself, to pass the list in as the
> parameter and then iterate over it to build a WHERE clause that uses IN
()?
Yes, for sure.
> Also, I haven't seen one, but is there a way to pass multiple
> parameters to a statement?
No, not through an additional method parameter. You can pass multiple
parameters as Map entries or JavaBeans properties (the latter is
preferred, but a few more lines of code).
Clinton
On Tue, 28 Dec 2004 11:51:46 -0600, Karen Koch <kmkoch@xxxxxxxxxxxxx> wrote:
>
>
>
> I'm not quite certain how this problem is best approached using SQLMaps:
>
>
>
> I want to implement a sort of "mass update" feature by which the database
> records that correspond to objects in a java.util.List have 3 fields set.
> All objects in the list will have the 3 fields set to the same 3 values.
>
>
>
> Is my best bet in writing the statement itself, to pass the list in as the
> parameter and then iterate over it to build a WHERE clause that uses IN
()?
>
>
>
> Also, I haven't seen one, but is there a way to pass multiple parameters
to
> a statement? Ideally, I want to pass the list itself and also a single
> integer that will be used to update one of the three fields and look up
the
> values to update the other two fields.
|
|