Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 53723 invoked from network); 27 Oct 2008 10:02:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Oct 2008 10:02:54 -0000 Received: (qmail 53904 invoked by uid 500); 27 Oct 2008 10:02:58 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 53888 invoked by uid 500); 27 Oct 2008 10:02:57 -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 53872 invoked by uid 99); 27 Oct 2008 10:02:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Oct 2008 03:02:57 -0700 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 marcel.reutegger@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 27 Oct 2008 10:01:45 +0000 Received: (qmail invoked by alias); 27 Oct 2008 10:02:22 -0000 Received: from bsl-rtr.day.com (EHLO [10.0.0.73]) [62.192.10.254] by mail.gmx.net (mp038) with SMTP; 27 Oct 2008 11:02:22 +0100 X-Authenticated: #894343 X-Provags-ID: V01U2FsdGVkX1/ljGNF5e/lgMhl9SnAodx+lU1sgVuZpzo6lRSSqI 14AJlozR//WR5z Message-ID: <490591AC.2000200@gmx.net> Date: Mon, 27 Oct 2008 11:02:20 +0100 From: Marcel Reutegger User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: jcr:deref usage References: <20184217.post@talk.nabble.com> In-Reply-To: <20184217.post@talk.nabble.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.58 X-Virus-Checked: Checked by ClamAV on apache.org Hi, iapilgrim wrote: > I want to use jcr:deref. In JSR spec, > For example, suppose there is a property of type REFERENCE called > myapp:author which refers to a node representing the author of this > document. A query expression to find the person’s last name property would > be: > /jcr:root/myapp:myDoc/ jcr:deref(@myapp:author, 'myapp:person')/address > The dereference expression above evaluates to one or more nodes which has > the name myapp:person. Subsequently a child node of each, representing the > person’s address, is selected. > My questions: > + I don't see where to query person's last name? I guess that's an error in the spec. to get the last name you'd have to run through the result nodes and get the last name property manually. > + It is not clear what will be return Doc or User? the query returns address nodes. > + Do I need to have strong reference ( oppose to weak reference that is > referred by path) jackrabbit currently only supports strong references, though it will eventually support also weak references as specified in JSR 283. > In my application: > my entry have a property "author" that refer to a user node (similar to spec > example) but when query like this > //blogsystem/posts/entry_2/jcr:deref(@author,'*') > --> no error and no results make sure the user nodes are referenceable and @author is a reference property. > and one more question: > Which JR version support predicate with jcr:deref? none, this is not yet implemented. regards marcel > I have searched the mailling list but found no answers so I need your help > Thanks and regards, > Van >