jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: jcr:deref usage
Date Mon, 27 Oct 2008 10:02:20 GMT

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.


> I have searched the mailling list but found no answers so I need your help
> Thanks and regards,
> Van

View raw message