Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 69234 invoked from network); 19 Nov 2010 17:03:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Nov 2010 17:03:26 -0000 Received: (qmail 7987 invoked by uid 500); 19 Nov 2010 17:03:57 -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 7979 invoked by uid 99); 19 Nov 2010 17:03:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Nov 2010 17:03:57 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [148.87.113.121] (HELO rcsinet10.oracle.com) (148.87.113.121) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Nov 2010 17:03:49 +0000 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oAJH3OXA007899 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Nov 2010 17:03:26 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oAJF6mTb030562 for ; Fri, 19 Nov 2010 17:03:24 GMT Received: from abhmt014.oracle.com by acsmt353.oracle.com with ESMTP id 795654081290186129; Fri, 19 Nov 2010 09:02:09 -0800 Received: from [192.168.0.12] (/69.181.138.81) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 19 Nov 2010 09:02:08 -0800 Message-Id: <03ECF73E-4BDE-47F9-9872-B29B50A30113@oracle.com> From: Craig L Russell To: jdo-dev@db.apache.org In-Reply-To: <201011191454.32606.andy@datanucleus.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Subject: Re: TCK : RelationshipManyToManyAllRelationships.testDeleteFromMappedSide Mime-Version: 1.0 (Apple Message framework v936) Date: Fri, 19 Nov 2010 09:02:07 -0800 References: <201011191454.32606.andy@datanucleus.org> X-Mailer: Apple Mail (2.936) X-Virus-Checked: Checked by ClamAV on apache.org Hi Andy, Regardless of the outcome, this is an issue that we should track. IIUC, either the tck test or the spec will have to change. It might be easier to track with a JIRA. Thanks, Craig On Nov 19, 2010, at 6:54 AM, Andy Jefferson wrote: > Hi, > > whilst this test passes with current DataNucleus, I was in the > process of > extending its support for managed relationships, and now get this > test to fail > which provokes this question :- > > pm.deletePersistent(proj1); > pm.flush(); > deferredAssertTrue(!emp1.getProjects().contains(proj1), > ASSERTION_FAILED + testMethod, > "Postcondition is false; " > + "other side of relationship not set on flush"); > > After the call to deletePersistent() and flush() the object "proj1" > is in > P_DELETED state. So when the call goes in to > emp1.getProjects().contains(proj) > this will interrogate the hashCode() method of Project. This is > defined as > public int hashCode() { > return (int)projid; > } > > But when using datastore identity "projid" is *not* a primary-key > field, and > so, as per section 5.5.6 of the spec > Read access to primary key fields is permitted. Any other > access to > persistent fields is not supported and might throw a > JDOUserException. > So what does the implementation do ? > > > Comments ? > > -- > Andy > DataNucleus (http://www.datanucleus.org) Craig L Russell Architect, Oracle http://db.apache.org/jdo 408 276-5638 mailto:Craig.Russell@oracle.com P.S. A good JDO? O, Gasp!