Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 28416 invoked from network); 7 Sep 2009 14:17:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Sep 2009 14:17:48 -0000 Received: (qmail 59451 invoked by uid 500); 7 Sep 2009 14:17:47 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 59400 invoked by uid 500); 7 Sep 2009 14:17:47 -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 59389 invoked by uid 99); 7 Sep 2009 14:17:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Sep 2009 14:17:47 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of christophe.lombart@gmail.com designates 74.125.78.26 as permitted sender) Received: from [74.125.78.26] (HELO ey-out-2122.google.com) (74.125.78.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Sep 2009 14:17:39 +0000 Received: by ey-out-2122.google.com with SMTP id 22so942303eye.1 for ; Mon, 07 Sep 2009 07:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=eH/0JuqOWx4Tl1L9IgTxqq1t1vErdo26W/JmzOu7CP0=; b=g3i/o1E1KoCqpy7pbrr7fESM1ZWga5yiIQOb6HhPzPNAkz/VVPtENLYGtIDKrmlUCl Y7pA86TikYAyHmLczcgir0Cf8nHOGABHaTIHoZcgp34Bmgb/yzdFp40WAYIpDZkhdRaw +OUpt94LpfrB9Tm9ascWaaEDcdhwOY4wljSgQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=BtgRh9hc/f/5hD+8INHQf1kEzGdOCgEhR6e6zlnWsI4udwRGDeCsNU6+0+DzdudZRV 209/pcDFSXvEnMtbhpYTzvkV9a5+0pPNvaZzgahSF3Rq3G9F2zAjcGVVRFu1DfT9/ND9 9QJSayxgk5IxLvQwxCwwBa6qn3ASQl/dF8yXg= MIME-Version: 1.0 Received: by 10.211.157.7 with SMTP id j7mr16393304ebo.2.1252333038235; Mon, 07 Sep 2009 07:17:18 -0700 (PDT) In-Reply-To: <1252316628.7238.3.camel@frax> References: <1252316628.7238.3.camel@frax> From: Christophe Lombart Date: Mon, 7 Sep 2009 16:16:58 +0200 Message-ID: <3b728ee90909070716r69dad0c0m8bdcf3976227cf33@mail.gmail.com> Subject: Re: OCM annotation for a collection of references To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi Ben, The following annoted class (in the unit tests) contains an collection of references : http://svn.apache.org/repos/asf/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/testmodel/uuid/B2.java This class is used in the unit tests : AnnotationUuidTest (see the method testCollectionOfBeanWithUuid). http://svn.apache.org/repos/asf/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/manager/uuid/AnnotationUuidTest.java HTH - Let me know if you need more info br, Christophe 2009/9/7 Ben Francis : > Dear List, > > I've been reading a previous thread from 2007 regarding persisting JCR > references using Jackrabbit's Object-Content-Mapping and am having > problems figuring out how to do so. > > I am currently trying to implement a tagging system which uses JCR > references to reference a "Tag" node from another content node in a > Jackrabbit repository. I've not been able to find any documentation on > how to annotate a field so that it is stored in JCR as a collection of > references. I've tried to figure this out from Jackrabbit unit tests but > so far haven't been successful. > > Has anyone successfully annotated a field so that it is stored in a > Jackrabbit repository as a collection of references to other nodes? If > so, how would you go about doing this, and how would you add an item to > the collection? > > Also, is it possible to efficiently lookup a list of nodes which > reference a particular node? I think I remember reading somethinga about > this (possibly in the JCR specification?) but I cant' find it now. > > Any help would be much appreciated! > > Thanks > > Ben >