jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: How to get the subnodes of a tree using sql?
Date Tue, 04 Sep 2007 06:58:37 GMT
And now with the correct user list :-) 

> Hello,
> 
> when adding the nodes, print out the getPath() to see their 
> absolute paths. Use this path in the jcr:path. I just tested 
> it for the trunk and it works without any problems
> 
> Regards Ard
> 
> ps I am crossposting to the user list. Continue the thread 
> over there pls since that is the correct list
> 
> > 
> > sorry for not specify clearly and thanks for you reply.
> > the root node is the default "root" node 
> > i use session.getRootNode() to get the default root node.
> > then i add "domain" nodes as children of "root" node,then 
> > "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 
> > use sql query
> > but get nothing.
> > i follow your sugguestion to modify the jcr:path,but still 
> get nothing
> >  jcr:path='/jcr:root/domain/information/news'";
> > other paths:'/domain/information/news'
> > /root/domain/information/news
> > also used,still get nothing.
> > 
> > 
> >  
> > 
> > Ard Schrijvers wrote:
> > > 
> > > Hello,
> > > 
> > >> 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 
> > >> nt:unstructured
> > >> where jcr:path='domain/information/news'";
> > > 
> > > shouldn't the jcr:path start with /root? 
> > > 
> > > Also note that users@apache.org might be a more appropriate 
> > list for your
> > > question since it is clearly a user question.
> > > 
> > > Regards Ard
> > > 
> > > 
> > > 
> > 
> > -- 
> > View this message in context: 
> 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.


Mime
View raw message