You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Bob Hanson <mn...@gmail.com> on 2005/02/28 21:27:11 UTC

complex inserts

I've found examples for performing complex selects which recursively
build objects and their children/lists of children.

In the same manner, does iBATIS support complex inserts? If so, I
haven't been able to find any examples. Essentially, what I want to be
able to do is create "insert maps" that will insert dependent objects
and their parents.

For example, if I have an Account object which gets associated (1:1)
with an Order object which is associated (1:M) with LineItem objects,
is there any way to map the insert so that I can just call my Account
insert xml statement and it will also insert the Order and LineItems?

Or is it the responsibility of my data access objects to insert data
in the correct order to maintain the referential integrity of my
database?

Re: complex inserts

Posted by Gilles Bayon <ib...@gmail.com>.
iBATIS doesn't support complex insert.
And yes, it is the responsibility of a service layer to insert data
in the correct order .

Cheers
-Gilles