ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lieven De Keyzer" <lieven_dekey...@hotmail.com>
Subject Re: complex inserts?
Date Tue, 24 May 2005 04:14:19 GMT

>From: Larry Meadors <larry.meadors@gmail.com>
>Reply-To: lmeadors@apache.org
>To: ibatis-user-java@incubator.apache.org
>Subject: Re: complex inserts?
>Date: Mon, 23 May 2005 21:50:01 -0600
>That all sounds like logic for your DAO or business layer.
>SQL maps are more fine-grained that that.
>On 5/23/05, Lieven De Keyzer <lieven_dekeyzer@hotmail.com> wrote:
> > In fact, it's even complexer than this, because when a certain 
> > is given as parameter and it is not present yet, is should be inserted, 
> > it is present, nothing should happen, and when it's not given as 
> > it should be deleted.

Hmm, I see. But these notificationWays belong to a Bookmark I think. So I 
should make these kind of test in the DAO layer. And make separate insert 
etc. statements for the bookmark table and for the notifications table?

But is it ok, to do something like:

    update("updateBookmark", bookmark);

    List notif = queryForList("getNotificationsByBookmark", bookmark);

    //perform various tests to see which notifications are already present 
and wich are not.
    //insert some notifications, update some and delete some


View raw message