Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 12720 invoked from network); 7 Jul 2010 14:39:47 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jul 2010 14:39:47 -0000 Received: (qmail 31899 invoked by uid 500); 7 Jul 2010 14:39:46 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 31783 invoked by uid 500); 7 Jul 2010 14:39:45 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 31676 invoked by uid 99); 7 Jul 2010 14:39:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 14:39:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 14:39:42 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o67EVpF1001604 for ; Wed, 7 Jul 2010 14:31:51 GMT Message-ID: <33002933.239811278513111369.JavaMail.jira@thor> Date: Wed, 7 Jul 2010 10:31:51 -0400 (EDT) From: "Stefan Guggisberg (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Resolved: (JCR-2667) NodeReferences are lost when deleting and setting the same reference in the same save() cycle In-Reply-To: <22985561.47381277415533380.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-2667?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Guggisberg resolved JCR-2667. ------------------------------------ Resolution: Fixed fixed in svn revision 961388 > NodeReferences are lost when deleting and setting the same reference in t= he same save() cycle > -------------------------------------------------------------------------= -------------------- > > Key: JCR-2667 > URL: https://issues.apache.org/jira/browse/JCR-2667 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core > Affects Versions: 1.6.1 > Reporter: C=C3=A9dric Damioli > Priority: Critical > Fix For: 1.6.3 > > > I've written the following snippet to illustrate the issue : > Node root =3D session.getRootNode(); > =20 > Node a =3D root.addNode("a"); > Node b =3D root.addNode("b"); > b.addMixin("mix:referenceable"); > =20 > a.setProperty("p", b); > =20 > root.save(); > =20 > System.out.println(b.getReferences().getSize()); // --> corre= ctly returns 1 > =20 > a.setProperty("p", (Node) null); > a.setProperty("p", b); > =20 > root.save(); > =20 > System.out.println(b.getReferences().getSize()); // --> return= s 0 ! > When the ChangeLog is processed, added references are processed before de= leted ones, so the persisted NodeReferences is finally wrong. > I've set the priority of this issue to critical, because the persisted re= ferences count is corrupted. > A simple workaround is to first remove the property, then save, then add = the property again, but it not satisfying. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.