Return-Path: Delivered-To: apmail-db-ojb-dev-archive@www.apache.org Received: (qmail 59645 invoked from network); 6 Dec 2003 21:38:09 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 6 Dec 2003 21:38:09 -0000 Received: (qmail 23569 invoked by uid 500); 6 Dec 2003 21:37:56 -0000 Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 23545 invoked by uid 500); 6 Dec 2003 21:37:56 -0000 Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "OJB Developers List" Reply-To: "OJB Developers List" Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 23508 invoked from network); 6 Dec 2003 21:37:56 -0000 Received: from unknown (HELO mailout07.sul.t-online.com) (194.25.134.83) by daedalus.apache.org with SMTP; 6 Dec 2003 21:37:56 -0000 Received: from fwd09.aul.t-online.de by mailout07.sul.t-online.com with smtp id 1ASk7l-0002EN-01; Sat, 06 Dec 2003 22:38:01 +0100 Received: from code-au-lait.de (bp-KxeZrreAXsYuO+zgeL+z1LjWk-Tn2gj6MSZnPxZFIzbPe2H5ucA@[217.224.85.136]) by fmrl09.sul.t-online.com with esmtp id 1ASk7Y-1d2vFw0; Sat, 6 Dec 2003 22:37:48 +0100 Message-ID: <3FD24C28.7040403@code-au-lait.de> Date: Sat, 06 Dec 2003 22:37:44 +0100 From: Armin Waibel User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: OJB Developers List Subject: Re: [Bug?] PBImpl delete of 1:n relation when auto-delete is set true References: <3FD21A6A.4090105@code-au-lait.de> <3FD248A2.30507@web.de> In-Reply-To: <3FD248A2.30507@web.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Seen: false X-ID: bp-KxeZrreAXsYuO+zgeL+z1LjWk-Tn2gj6MSZnPxZFIzbPe2H5ucA@t-dialin.net X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Thomas, Thomas Mahler wrote: >> 1. auto-retrieve is set true and we query a Product, then we get all >> Components from Product and remove some components (or set components >> 'null'). After this we delete this Product instance ---> auto-delete >> is true, thus all found components will be deleted (without the >> removed) BUT we should delete all components associated with this >> Product instance. > > > Mhh. The original semantics of auto-delete=true was to delete all items > that are contained in the collection. why should the PB delete instances > that are not in the collection anymore? > Problem is when foreign key constraints defined in the DB. >> 2. auto-retrieve is set false. Get a Product and delete it. Since we >> set auto-delete true we expect that all associated Components will be >> deleted too. >> > > This will also not work for the same reason. > > I see where you are coming from. You want to have the same semantics as > with a database based cascading delete. > yep, that was my interpretation of auto-delete (my misinterpretation;-)). > I don't think the OJB behaviour is buggy. It simply works as designed. now its clear! > (I fear I'm sounding like Bill Gates now ;-)) If OJB will run on 75% of all PC in future it's ok to sound like Bill ;-) > Maybe we should clearly state that auto-delete="true" is not equivalent > with a cascing delete in the database? yes, please a clear explanation of all auto-xy attributes in the docs. regards, Armin > > have a nice weekend, > Thomas > >> Or do I misinterpret the 'auto-delete' flag? >> >> regards, >> Armin >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org >> For additional commands, e-mail: ojb-dev-help@db.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org > For additional commands, e-mail: ojb-dev-help@db.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org