From: Larry Meadors <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
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.

Larry


On 5/23/05, Lieven De Keyzer <[EMAIL PROTECTED]> wrote:
> In fact, it's even complexer than this, because when a certain notification > is given as parameter and it is not present yet, is should be inserted, when > it is present, nothing should happen, and when it's not given as parameter,
> 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:

updateBookmark(Bookmark){
   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

}


Reply via email to