Hi,
2009/11/2 pkrishna <[email protected]>:
>
> I want to know if it is possible to query for a particular NodeId in the
> tables automatically generated by JackRabbit.
>
> We have a customNode where the node name is an Id we generate. Let's call
> this Node A. Node A has a child which is also a custom Node and this Node
> has some custom properties we have defined. Lets call this Node B. Node B
> has a property of type jcr:content.
>
> Is there a way for me to query the database for Node A using a where
> criteria? Which table should I query against? Is this possible at all.
you should use the query mechanism defined by JCR.
QueryManager qm = ...
Query q = qm.createQuery("select * from your:type where property =
'value'", Query.SQL);
QueryResult result = q.execute();
I'm not sure I understand your use case. maybe something like this
(using XPath syntax)?
//element(*, type-of-node-A)[*/@jcr:content = 'some-value']
though, jcr:content is usually the name of a child node of a nt:file node.
so you'd rather want to do this?
//element(*, type-of-node-A)[jcr:contains(*/jcr:content, 'foo')]
regards
marcel
> --
> View this message in context:
> http://old.nabble.com/Finding-NodeName-using-SQL-Query-Analyzer-tp26157796p26157796.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>