Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 44686 invoked from network); 22 Jun 2006 15:05:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Jun 2006 15:05:39 -0000 Received: (qmail 36012 invoked by uid 500); 22 Jun 2006 15:05:26 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 35954 invoked by uid 500); 22 Jun 2006 15:05:26 -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 35929 invoked by uid 99); 22 Jun 2006 15:05:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jun 2006 08:05:26 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of tobias.strasser@gmail.com designates 66.249.92.173 as permitted sender) Received: from [66.249.92.173] (HELO ug-out-1314.google.com) (66.249.92.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jun 2006 08:05:24 -0700 Received: by ug-out-1314.google.com with SMTP id a2so533588ugf for ; Thu, 22 Jun 2006 08:05:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=WwONGgWadxoYXyy68KlIuAosZEOFP3oFT8gbmw9dDhJKaidtjtaxBZYiTafys/slmcboIYrBWv5ohiGkxdjFvVjbCxyMlwGSZOdqDME+RcNsMIus33pmqikMWOyJnjXlNtWcuu1o58LKwWRkM/Zp7fCTA5IKO5c7bAi6KsKqrq0= Received: by 10.78.140.17 with SMTP id n17mr567346hud; Thu, 22 Jun 2006 08:05:02 -0700 (PDT) Received: by 10.78.50.19 with HTTP; Thu, 22 Jun 2006 08:05:02 -0700 (PDT) Message-ID: <8be731880606220805q66ffb5b4g35f6d96ce638d692@mail.gmail.com> Date: Thu, 22 Jun 2006 17:05:02 +0200 From: "Tobias Bocanegra" Reply-To: tobias.bocanegra@day.com Sender: tobias.strasser@gmail.com To: dev@jackrabbit.apache.org Subject: Re: Problem with child order after restoring of parent In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: 495c99c69e449b04 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N this might be a bug. can you file a jira issue? thanks. regards, toby On 6/22/06, Tanju Erinmez wrote: > Greetings, > > I'm using the latest trunk version and tried the following sequence > which leads to swapped child nodes (this worked in 1.0.1). > Specifically: > > Add nodes: > parent > childA > childB > > Remove childA: > parent > childB > > Restore initial version: > parent > childB > childA > > The parent node is of type nt:unstructured which carries an > OrderableChildNodes=true so I assumed that upon restoring the order > would be preserved. > > What would be the correct behavior for this? > > Cheers, > Tanju > > -------------- > > TESTCASE used with both Derby & InMemPMs (boiled down beyond sense :) > > // Add parent & childA, childB > Node parent = session.getRootNode().addNode("parent", "nt:unstructured"); > parent.addMixin("mix:versionable"); > Node c1 = parent.addNode("childA", "nt:unstructured"); > c1.addMixin("mix:versionable"); > Node c2 = parent.addNode("childB", "nt:unstructured"); > c2.addMixin("mix:versionable"); > session.save(); > c1.checkin(); > c2.checkin(); > Version v1 = parent.checkin(); > // OK : parent.getNodes() -> childA, childB > > // Remove childA > parent = session.getRootNode().getNode("parent"); > parent.checkout(); > c1 = parent.getNodes().nextNode(); > c1.checkout(); > c1.remove(); > session.save(); > Version v2 = parent.checkin(); > // OK : parent.getNodes() -> childA, childB > > // Remove childA > parent = session.getRootNode().getNode("parent"); > parent.restore(v1, true); > // Not OK : parent.getNodes() -> childB, childA > -- -----------------------------------------< tobias.bocanegra@day.com >--- Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel T +41 61 226 98 98, F +41 61 226 98 97 -----------------------------------------------< http://www.day.com >---