Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 27193 invoked from network); 18 Dec 2006 09:14:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Dec 2006 09:14:35 -0000 Received: (qmail 86766 invoked by uid 500); 18 Dec 2006 09:14:37 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 86653 invoked by uid 500); 18 Dec 2006 09:14:37 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 86603 invoked by uid 99); 18 Dec 2006 09:14:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2006 01:14:37 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 18 Dec 2006 01:14:28 -0800 Received: (qmail 27021 invoked by uid 1977); 18 Dec 2006 09:14:08 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 18 Dec 2006 09:14:08 -0000 Date: Mon, 18 Dec 2006 01:14:08 -0800 (PST) From: Thomas Fischer To: Apache Torque Users List Subject: Re: criteria.setCascade(true) In-Reply-To: <4585C9F7.9090805@synyx.de> Message-ID: <20061218011044.B24659@minotaur.apache.org> References: <4585C9F7.9090805@synyx.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org I have also tried to figure it out once but could not understand what is happening. Because the torque team tried not to make any big changes in the 3.3 release, this was left as it is. Personally, I do not believe it does anything useful. Thomas On Sun, 17 Dec 2006, Markus Daniel wrote: > Hello, > just for understanding right... > > If cascade is set to true in a criteria (not in the DB-Schema) this will only proceed > like cascade if the FK from relation table is also a PK for the relation table? > > Snip from BasePeer#doDelete(Criteria criteria, Connection con) > ... > // Only delete rows where the foreign key is > // also a primary key. Other rows need > // updating, but that is not implemented. > if (columnMaps[j].isForeignKey() > && columnMaps[j].isPrimaryKey() > && key.equals(columnMaps[j].getRelatedName())) > ... > > Here a FK in a relation table is a PK in a corresponding entity table and not also a PK of the relation table, > so in this case setting cascade to true will have no affect > > Is this correct? > > I tried to use this setCascade(true) but for me it seems not to work or I don't know how to use it ;-( > > Can anybody explain this or give a hint/link? > > Thanks in advance, > Markus > > -- > /** > * Markus Daniel > * Bachelor of Science in Computer Science > * Synyx GmbH & Co. KG > * Karlstr. 68 > * 76137 Karlsruhe > * phone +49(0)721 66 48 79 31 > * fax +49(0)721 66 48 877 > * eMail markus.daniel@synyx.de > * www http://www.synyx.de > * irc http://irc.synyx.de > */ > > --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org