Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 78631 invoked from network); 10 Jun 2008 03:58:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jun 2008 03:58:15 -0000 Received: (qmail 34447 invoked by uid 500); 10 Jun 2008 03:58:17 -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 34436 invoked by uid 99); 10 Jun 2008 03:58:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jun 2008 20:58:17 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.43.133] (HELO sca-es-mail-2.sun.com) (192.18.43.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 03:57:26 +0000 Received: from fe-sfbay-10.sun.com ([192.18.43.129]) by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m5A3vYjY029073 for ; Mon, 9 Jun 2008 20:57:34 -0700 (PDT) Received: from conversion-daemon.fe-sfbay-10.sun.com by fe-sfbay-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K2800I01AUAJ800@fe-sfbay-10.sun.com> (original mail from Craig.Russell@Sun.COM) for jdo-dev@db.apache.org; Mon, 09 Jun 2008 20:57:34 -0700 (PDT) Received: from [192.168.0.12] (c-76-126-212-146.hsd1.ca.comcast.net [76.126.212.146]) by fe-sfbay-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K2800G8ZAZX4S20@fe-sfbay-10.sun.com> for jdo-dev@db.apache.org; Mon, 09 Jun 2008 20:57:33 -0700 (PDT) Date: Mon, 09 Jun 2008 20:57:33 -0700 From: Craig L Russell Subject: Re: Bidirectional relationship tests in the TCK In-reply-to: <484CED20.5080409@artnology.com> Sender: Craig.Russell@Sun.COM To: jdo-dev@db.apache.org Message-id: <65CC0AF6-4CFF-461C-99E3-D6A7002D70E9@SUN.com> MIME-version: 1.0 X-Mailer: Apple Mail (2.924) Content-type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary=Apple-Mail-80-687335648 References: <483C3C1A.9010501@artnology.com> <7BCCC389-35CA-41E2-A009-5194769AAE17@SUN.com> <48497443.7070004@artnology.com> <0C0C35FC-10AA-4734-91CA-3B02265588CA@SUN.com> <484CED20.5080409@artnology.com> X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-80-687335648 Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Hi J=F6rg, On Jun 9, 2008, at 1:43 AM, Joerg von Frantzius wrote: > Hello Craig, > > what I really meant was: when modifying state of bidirectional =20 > associations on detached objects, should those detached objects =20 > immediately reflect consistent bidirectional state in the VM even =20 > before attaching? E.g. set a one-to-one association from one side, =20 > and immediately see the newly associated object from the other side. Well, no. Detached objects are not associated with a =20 PersistenceManager and so flush() or commit() cannot by definition be =20= applied to them. So there is no specified behavior that applies to =20 relationships of detached objects. > > "15.3 Relationship Mapping" says that "Regardless of which side =20 > changes the relationship, > flush (whether done as part of commit or explicitly by the user) =20 > will modify the datastore to > reflect the change and will update the memory model for consistency." > > There is no flush when modifying detached objects, so this doesn't =20 > really sound like the memory model should get updated before the =20 > detached objects are attached again and a flush actually happens. =20 > =46rom an application programmer's point of view, it would of course =20= > be desirable if behaviour was consistent both in attached and =20 > detached state. It is consistent. If you flush or commit, all the specified behavior =20 occurs, regardless of where the changes were made (attached or =20 detached). Once the detached object is brought into the domain of a =20 PersistenceManager via makePersistent, the flush and commit behavior =20 applies. Regards, Craig > > > Regards, > J=F6rg > > Craig L Russell schrieb: >> Hi J=F6rg, >> >> On Jun 6, 2008, at 10:30 AM, Joerg von Frantzius wrote: >> >>> Sorry for not having had any time to look into this more =20 >>> thoroughly yet. I'll hopefully find it next week. >>> >>> I think I experienced problems with changing bidirectional =20 >>> relationships on detached objects. Now I'm not sure whether the =20 >>> spec intended those to be managed as well? >> >> Sure, any change to a persistent field of a detached object should =20= >> be reflected in the database upon reconnection and commit. >> >> If you can write a test case, we'd be happy to consider adding it =20 >> to the TCK. >> >> Craig >>> >>> >>> Craig L Russell schrieb: >>>> HI J=F6rg, >>>> >>>> On May 27, 2008, at 9:51 AM, Joerg von Frantzius wrote: >>>> >>>>> Hi, >>>>> >>>>> when looking at the relationship tests in =20 >>>>> org.apache.jdo.tck.mapping, it seems that the tests for =20 >>>>> bidirectional integrity only test changing relationships from =20 >>>>> the "mapped-by" side of the relationship? That's my impression =20 >>>>> at least from looking at the method names e.g. in =20 >>>>> Relationship1ToManyAllRelationships.java. >>>> >>>> There are a few relationship tests, and the intent was (is) to =20 >>>> test changing relationships from both sides. >>>> >>>> If you can't find what you're looking for (in all the tests) =20 >>>> please let us know. >>>> >>>> Craig >>>>> >>>>> >>>>> I'm asking this because I believe to see inconsistencies with =20 >>>>> bidirectional relationships in the RI. >>>>> >>>>> Regards, >>>>> J=F6rg >>>>> >>>>> --=20 >>>>> = ____________________________________________________________________ >>>>> artnology GmbH - Milastra=DFe 4 - 10437 Berlin - Germany >>>>> Gesch=E4ftsf=FChrer: Ekkehard Blome (CEO), Felix Kuschnick (CCO) >>>>> Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376 UST-=20= >>>>> Id. DE 217652550 >>>>> >>>> >>>> Craig Russell >>>> Architect, Sun Java Enterprise System = http://java.sun.com/products/jdo >>>> 408 276-5638 mailto:Craig.Russell@sun.com >>>> P.S. A good JDO? O, Gasp! >>>> >>> >>> >>> --=20 >>> ____________________________________________________________________ >>> artnology GmbH - Milastra=DFe 4 - 10437 Berlin - Germany >>> Gesch=E4ftsf=FChrer: Ekkehard Blome (CEO), Felix Kuschnick (CCO) >>> Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376 UST-=20 >>> Id. DE 217652550 >>> >> >> Craig Russell >> Architect, Sun Java Enterprise System http://java.sun.com/products/=20= >> jdo >> 408 276-5638 mailto:Craig.Russell@sun.com >> P.S. A good JDO? O, Gasp! >> > > > --=20 > ____________________________________________________________________ > artnology GmbH - Milastra=DFe 4 - 10437 Berlin - Germany > Gesch=E4ftsf=FChrer: Ekkehard Blome (CEO), Felix Kuschnick (CCO) > Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376 UST-Id. =20= > DE 217652550 > Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:Craig.Russell@sun.com P.S. A good JDO? O, Gasp! --Apple-Mail-80-687335648 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGUDCCAwkw ggJyoAMCAQICECvOQSuIjHMvOZRC95BRg/wwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA3MTIxMDE1MjM1MVoXDTA4MTIwOTE1MjM1 MVowbDEQMA4GA1UEBBMHUnVzc2VsbDEUMBIGA1UEKhMLQ3JhaWcgTGFpcmQxHDAaBgNVBAMTE0Ny YWlnIExhaXJkIFJ1c3NlbGwxJDAiBgkqhkiG9w0BCQEWFUNyYWlnLlJ1c3NlbGxAU3VuLkNPTTCC ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKzqGlLUastboCRqc0iBoTz2ODcqpMpEyPUo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