ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: referencing complex POJO properties for parameters in inserts
Date Thu, 27 Jan 2005 08:33:08 GMT
I've done it both ways.  It really depends on the function you're
implementing.  If it makes business sense to be iterating over a
number of business objects for processing, then use Larry's
suggestion.  If the iteration is an implementation detail that you
want to hide, put it in the DAO.

Cheers,
Clinton


On Wed, 26 Jan 2005 06:04:40 -0700, Larry Meadors
<larry.meadors@gmail.com> wrote:
> There really is no advantage to doing this in your DAO.
> 
> Typically, I would do it this way (with struts, if you are using
> something else, it would work the same way):
> 
> MyStrutsAction -> MyBusinessLogic -> MyDao -> SqlMap
> 
> In the MyBusinessLogic class, I do the looping before the dao layer,
> and keep the DAO layer simple - it has only to insert a single object.
> 
> Larry
> 
> On Tue, 25 Jan 2005 17:56:01 +1000, Andrew Fooks <a.fooks@qut.edu.au> wrote:
> >  Clinton has said that the iterate tag isn't really designed for the above usage,
so
> > I guess it's time to refactor.  Anyone have any suggestions?
>

Mime
View raw message