Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 51742 invoked from network); 30 May 2007 06:34:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 May 2007 06:34:55 -0000 Received: (qmail 15861 invoked by uid 500); 30 May 2007 06:34:58 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 15827 invoked by uid 500); 30 May 2007 06:34:58 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Delivered-To: moderator for derby-dev@db.apache.org Received: (qmail 42890 invoked by uid 99); 30 May 2007 04:08:33 -0000 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Content-class: urn:content-classes:message Subject: Cannot delete on many-to-many relationship MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7A26F.E808D32F" Date: Wed, 30 May 2007 11:06:30 +0700 Message-ID: <8C29AD40787A694A81108B3FBF4C15F10151AAD1@hue.cybersoft-vn.com> X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Cannot delete on many-to-many relationship Thread-Index: Aceib+cE3F9C2+9/RQOSuL/ahna53Q== From: "Tuan Nguyen Minh" To: X-Spam-Processed: cybersoft-vn.com, Wed, 30 May 2007 11:06:37 +0700 (not processed: message from valid local sender) X-MDRemoteIP: 172.17.1.6 X-Return-Path: tuannguyenminh@GlobalCybersoft.Com X-Envelope-From: tuannguyenminh@GlobalCybersoft.Com X-MDaemon-Deliver-To: derby-dev@db.apache.org X-MDAV-Processed: cybersoft-vn.com, Wed, 30 May 2007 11:06:38 +0700 X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C7A26F.E808D32F Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, I'm a new user of derby. I have a problem want to support: When executing the statement=20 =20 em.createQuery("delete from Subject").executeUpdate(); =20 where Subject is in a many-to-many relationship with Book, and Subject owns the relationship, one expects that the corresponding entry in the SUBJECT_BOOK table would be deleted. This happens when bulk deleting one-to-many relationships that are mapped with a join table, as well as for *-to-one relationships mapped with a foreign key. It also happens when individually deleting objects. However, it does not happen when bulk deleting the owning side of a many-to-many relationship. =20 Thanks & best regards, Tuan Nguyen ------_=_NextPart_001_01C7A26F.E808D32F Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi =
all,
I’m =
a new user of derby. I have a problem want to =
support:
When =
executing the statement 
 
em.createQuery("delete from =
Subject").executeUpdate();
 
where =
Subject is in a many-to-many relationship with Book, and Subject owns =
the relationship,
one =
expects that the corresponding entry in the SUBJECT_BOOK table would be =
deleted.  This
happens =
when bulk deleting one-to-many relationships that are mapped with a join =
table, as
well as =
for *-to-one relationships mapped with a foreign key.  It also =
happens when individually
deleting =
objects.  However, it does not happen when bulk deleting the owning =
side of a many-to-many
relationship.

 

Thanks & best = regards,

    Tuan = Nguyen

------_=_NextPart_001_01C7A26F.E808D32F--