From jdo-dev-return-5273-apmail-db-jdo-dev-archive=www.apache.org@db.apache.org Tue Nov 14 22:56:58 2006 Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 93706 invoked from network); 14 Nov 2006 22:56:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Nov 2006 22:56:58 -0000 Received: (qmail 7280 invoked by uid 500); 14 Nov 2006 22:57:08 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 7269 invoked by uid 99); 14 Nov 2006 22:57:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2006 14:57:08 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2006 14:56:57 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 98F787142D7 for ; Tue, 14 Nov 2006 14:56:37 -0800 (PST) Message-ID: <16636578.1163544997608.JavaMail.jira@brutus> Date: Tue, 14 Nov 2006 14:56:37 -0800 (PST) From: "Craig Russell (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Commented: (JDO-414) CallingJdoPreclear tries to add the same instance to multiple 1-M relations In-Reply-To: <5045913.1156924102350.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/JDO-414?page=comments#action_12449851 ] Craig Russell commented on JDO-414: ----------------------------------- Ok, sounds good. > CallingJdoPreclear tries to add the same instance to multiple 1-M relations > --------------------------------------------------------------------------- > > Key: JDO-414 > URL: http://issues.apache.org/jira/browse/JDO-414 > Project: JDO > Issue Type: Bug > Components: tck2 > Affects Versions: JDO 2 final > Reporter: Marc Prud'hommeaux > Assigned To: Michelle Caisse > Priority: Minor > > The CallingJdoPreclear test tries to add the same instance to multiple one-to-many relations in different instances, which may result in validation errors at commit time. The code that does this is: > primaryObj.addChild(secondaryObj); // primaryObj contains one child; secondaryObj contains none. primaryObj is now dirty > ... > ternaryObj.addChild(secondaryObj); > Errors can be worked around by removing secondaryObj from primaryObj.children before adding it to ternaryObj. E.g.: > primaryObj.addChild(secondaryObj); // primaryObj contains one child; secondaryObj contains none. primaryObj is now dirty > primaryObj.children.remove(secondaryObj); > ... > ternaryObj.addChild(secondaryObj); > Alternately, the call to "primaryObj.addChild(secondaryObj);" can probably just be skipped ... it doesn't look like it would impact the test case. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira