ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Updating Multiple Tables per Single Root Object
Date Mon, 24 Jul 2006 19:28:13 GMT
Not really.  The recommended practice is to write a DAO method that will do
this - like updateAuction(Auction auction).  The DAO method should update
each table individually with multiple calls to iBATIS for the different
tables.  This should all be in a single transaction too - either start a
transaction in the DAO method, or start the transaction in the service layer
if you have a distinct service layer.

Jeff Butler


On 7/24/06, Mississippi John Hurt <johnhurt@gmail.com> wrote:
>
> Hi,
> Is there a way to update multiple tables for a single object in ibatis?
> Say you have a Auction object with a List of Bid objects. Could you do a
> mapping for an update similar to a resultmap for select?  I'm thinking that
> even using ibatis, you'd just use individual updates as if you weren't using
> ibatis. Is that true?  Thanks.
>
>

Mime
View raw message