jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Nuescheler" <david.nuesche...@gmail.com>
Subject Re: JCR only returns handles??
Date Thu, 12 Apr 2007 14:09:40 GMT
Hi Rainer,

you can access the "name" property via the
QueryResult.getNodes() method and then use
.getProperty("name") on the nodes.

Since Jackrabbit supports querying of residual and
"undefined" properties and also supports the nodetype
inheritance on query you can use properties
in the "where clause" that are not explicitely defined
in the nodetype that you are using in the "from clause".

Not every node returned by your query
must contain a "name"-property since it is not
specified in nt:base, even if they match your filter
criteria of controlType='link'.

If you are using a nodetype that specifies the
property "name" explicitely in its definition, you can
use something like:

[myapp:Control]
- name
- controlType


SELECT name FROM myapp:Control WHERE controlType LIKE 'link'

(Is there a reason for using "LIKE" without a joker instead of "="?)

regards,
david

On 4/12/07, rainer <RainerBlumenthal@gmx.de> wrote:
>
> Hi,
>
> i want to find a node, that contains e.g. "controlType : link" and from this
> node i want to get the name nodeData...
> ("name" and "controlType" are nodeDatas under the same node)
>
> i tried it that way:
>
> SELECT name FROM nt:base WHERE controlType LIKE 'link'
>
> but it only returns handles like:
> "/modules/templating/dialogs/fs/presentLink/tab"
>
> i even can do this:
>
> SELECT abcdefghijk FROM nt:base WHERE controlType LIKE 'link'
>
> and get the same results as mentioned above... so what am i doing wrong? Is
> there always the "*" nevertheless what i write - or do i have the wrong
> "Result Item Type" ?
>
> thx for any help
>
>
> --
> View this message in context: http://www.nabble.com/JCR-only-returns-handles---tf3564315.html#a9955736
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Mime
View raw message