Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 82648 invoked from network); 4 Sep 2007 06:59:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Sep 2007 06:59:17 -0000 Received: (qmail 76335 invoked by uid 500); 4 Sep 2007 06:59:11 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 76317 invoked by uid 500); 4 Sep 2007 06:59:11 -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 76299 invoked by uid 99); 4 Sep 2007 06:59:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Sep 2007 23:59:11 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [213.133.33.40] (HELO smtp.is.nl) (213.133.33.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 06:59:06 +0000 Received: from [213.133.51.241] (HELO hai01.hippo.local) by smtp.is.nl (CommuniGate Pro SMTP 5.0.10) with ESMTP id 23039367 for users@jackrabbit.apache.org; Tue, 04 Sep 2007 08:58:42 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.0.6619.12 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: How to get the subnodes of a tree using sql? Date: Tue, 4 Sep 2007 08:58:37 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to get the subnodes of a tree using sql? Thread-Index: AcfumJ1LTDTf1+gSSK6q7BU176INCQAJrNrwAABV3lA= From: "Ard Schrijvers" To: X-Virus-Checked: Checked by ClamAV on apache.org And now with the correct user list :-)=20 > Hello, >=20 > when adding the nodes, print out the getPath() to see their=20 > absolute paths. Use this path in the jcr:path. I just tested=20 > it for the trunk and it works without any problems >=20 > Regards Ard >=20 > ps I am crossposting to the user list. Continue the thread=20 > over there pls since that is the correct list >=20 > >=20 > > sorry for not specify clearly and thanks for you reply. > > the root node is the default "root" node=20 > > i use session.getRootNode() to get the default root node. > > then i add "domain" nodes as children of "root" node,then=20 > > "information" > > nodes as children of "domain" node,and "news" nodes children of > > "information" node. then save. > > but now i want to select some "news" nodes from this tree, i=20 > > use sql query > > but get nothing. > > i follow your sugguestion to modify the jcr:path,but still=20 > get nothing > > jcr:path=3D'/jcr:root/domain/information/news'"; > > other paths:'/domain/information/news' > > /root/domain/information/news > > also used,still get nothing. > >=20 > >=20 > > =20 > >=20 > > Ard Schrijvers wrote: > > >=20 > > > Hello, > > >=20 > > >> Andvar wrote: > > >> the structure of the nodes is as follows: > > >> root > > >> | > > >> domain > > >> | > > >> information > > >> | > > >> news > > >> I use sql to search the news nodes like this:"select * from=20 > > >> nt:unstructured > > >> where jcr:path=3D'domain/information/news'"; > > >=20 > > > shouldn't the jcr:path start with /root?=20 > > >=20 > > > Also note that users@apache.org might be a more appropriate=20 > > list for your > > > question since it is clearly a user question. > > >=20 > > > Regards Ard > > >=20 > > >=20 > > >=20 > >=20 > > --=20 > > View this message in context:=20 > http://www.nabble.com/How-to-get-the--subnodes-of-a-tree-using -sql--tf4371364.html#a12470569 Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.