Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6770EE741 for ; Sat, 2 Mar 2013 12:56:20 +0000 (UTC) Received: (qmail 77688 invoked by uid 500); 2 Mar 2013 12:56:19 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 77188 invoked by uid 500); 2 Mar 2013 12:56:15 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 77129 invoked by uid 99); 2 Mar 2013 12:56:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Mar 2013 12:56:13 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of david@liip.ch designates 207.126.144.129 as permitted sender) Received: from [207.126.144.129] (HELO eu1sys200aog110.obsmtp.com) (207.126.144.129) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Mar 2013 12:56:05 +0000 Received: from mail-wg0-f69.google.com ([74.125.82.69]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKUTH20Zgx1js42bIkV07uPE1kjdSR4p5f@postini.com; Sat, 02 Mar 2013 12:55:45 UTC Received: by mail-wg0-f69.google.com with SMTP id fn15so4425604wgb.8 for ; Sat, 02 Mar 2013 04:55:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-received:message-id:date:from:user-agent:mime-version :to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding:x-gm-message-state; bh=ZqAnzn6kpZjD21UMotueehxO3SOektWAPmCJH8Ib3FA=; b=CivePsXqLnrt2bPKToN7w9eTqB1EV6LkD55zNCEJRh3rwYRkRa+O37bgYb9mKBEQcS oj/B1bGcfIs9v/pKZeVg2pLms0C9Df71foILzw7veoBeu3R1v+KSX2qKCEMrw3s5WBwk KobDswxQNNiOQj9czNtLoTAHtkiNIj3k4+rRmiZOos4G5Lvm259penriRFb22C4EE3e2 9JBBxH1qeuwiMyje+wmefweu1y0XU007v6DkJg+kWEsYGLSi9xeTOTGgI1AimhD1JjJ8 HxVMQXqByWHSInCjsvkfs+SfyX4EQnzhRqvNrUuJ9VZfanPgK68E8AyDV/0P7mMFVTfI fjEg== X-Received: by 10.180.93.168 with SMTP id cv8mr2950796wib.5.1362228945340; Sat, 02 Mar 2013 04:55:45 -0800 (PST) X-Received: by 10.180.93.168 with SMTP id cv8mr2950788wib.5.1362228945182; Sat, 02 Mar 2013 04:55:45 -0800 (PST) Received: from [192.168.2.2] (84-73-131-156.dclient.hispeed.ch. [84.73.131.156]) by mx.google.com with ESMTPS id ex1sm3359436wib.7.2013.03.02.04.55.43 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Mar 2013 04:55:44 -0800 (PST) Message-ID: <5131F6CE.5070700@liip.ch> Date: Sat, 02 Mar 2013 13:55:42 +0100 From: David Buchmann User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: users@jackrabbit.apache.org CC: Lars Janssen Subject: Re: Trying to understand and use version cascade References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkLiDaGziuSAosnIhbrwWV+Rb57d/zu9JU+Ifrv/9dkks5BcbYkx0Wm/sqhlJ8CgbxFDDdbaPP/7XLigkGwq8CXzUhMd1exFJ7+x1wbG0JxR7V3KUwNIRbEVSXciobMxmsmvkI0DxvnlTH/HNwAeGfr6jSgUIU8RSYyaG5ZinHLiYP86UI= X-Virus-Checked: Checked by ClamAV on apache.org hi, i don't fully grasp things, but after another hunt through the jcr doc, i think your cnd is not correct. there is an on-parent-version or onParentVersion attribute that controls if children are versioned along. best try to read this chapter: http://www.day.com/specs/jcr/2.0/15_Versioning.html it will mostly shorten the feature to OPV - maybe this helps? [phpcr:versionCascade] > nt:unstructured + * multiple copy i think the "multiple" here means there may be same-name siblings (which you should not need to explicitly allow as its the default. and in the context of jackalope and phpcr-odm, its actually not working at all. i don't know what the "copy" stands for, but i think you need an onParentVersion attribute set somewhere. btw, > The nt:unstructured type I'm inheriting from comes from part of the > PHPCR project, I believe it uses this: nt:unstructured is not a PHPCR specific thing but part of JCR too. cheers, david Am 28.02.2013 16:55, schrieb Lars Janssen: > Hi all, > > I'm new to the list, but did have a good look through the archives. :) > > My problem: I have nodes representing pages and blocks (of content) in a > CMS. Pages can contain pages or blocks. I'm looking to add page versioning > capability, such that if I create a checkpoint (version) on a page, the > same is done for all child blocks (although to keep this simple, I'm > initially just trying to let it happen for all children). > > I'm using Jackrabbit 2.4.3 and PHP Content > Repository[1]/Jackalope-Jackrabbit[2] to connect my PHP application to it. > > Here's the CND for the node type I'm using: > > [phpcr:versionCascade] > nt:unstructured > + * multiple copy > > The nt:unstructured type I'm inheriting from comes from part of the PHPCR > project, I believe it uses this: > > [nt:unstructured] > ORDERABLE > - * (UNDEFINED) MULTIPLE > - * (UNDEFINED) > + * (nt:base) = nt:unstructured SNS VERSION > > If you don't mind looking at some PHP code, you can see what I'm trying to > do in my Github tests pull request[3][4] otherwise, here are the steps in > mostly pseudo-code: > > create parent/child nodes: > /tests_version_base/versioned (with property foo = something) > /tests_version_base/versioned/version_child (with property > foo_c = something_c) > checkpoint('/tests_version_base/versioned') > node->setProperty('foo', 'bar') > childNode->setProperty('foo_c', 'bar_c') > session->save() > checkin('/tests_version_base/versioned') > > What I'm hoping to see at this point is that both the nodes (parent and > child) have a corresponding frozen node, even though I only did a > checkpoint on the parent. What I actually see is a frozen node for the > parent (as expected) but not for the child. > > I suspect my understanding of how this works is not right. Should child > nodes automatically be versioned like this, or is there another way to get > something like this behaviour? > > Thanks, > > Lars. > > References: > [1] https://github.com/phpcr/phpcr > [2] https://github.com/jackalope/jackalope-jackrabbit > [3] > https://github.com/fazy/phpcr-api-tests/blob/c7cd60c7bfaf9bdb2211e8c8676344a58fa38a9b/tests/15_Versioning/VersionTest.php#L20 > [4] > https://github.com/fazy/phpcr-api-tests/blob/c7cd60c7bfaf9bdb2211e8c8676344a58fa38a9b/tests/15_Versioning/VersionTest.php#L91 > -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch