I am very new to jackrabit but i see one thing and i use an other solution for 
nearly the same problem.
First u write "ORDER BY jcr:name" but without any direction. So I would try 
"ORDER BY jcr:name ASC" or "DESC".

If this does not work. 
I had nearly the same problem, in my Application. I have a view that is showing 
a list of files in a folder. First try was realy slow because I transported all 
the binary data from the file nodes, too. My solution is that I only transport 
all meta data from the server to the client, that what is necessary for 
ordering and displaying. After a user decides to access a file from the server 
I recall the server to only get this file. Its very fast and makes no 
difference for the user.

Regards rene

-----Ursprüngliche Nachricht-----
Von: Conoly, Brett [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 29. April 2008 22:50
An: users@jackrabbit.apache.org
Betreff: RE: getProperty and jcr:name

Sounds like that may be the solution I'm actually looking for but I just
tried it with:
select jcr:name from nt:file where jcr:path LIKE '/someFolderNode/%'
ORDER BY jcr:name
And it did not sort them properly.  I also tried it with jcr:path. Any
other suggestions?
Thanks again

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tobias
Bocanegra
Sent: Tuesday, April 29, 2008 4:45 PM
To: users@jackrabbit.apache.org
Subject: Re: getProperty and jcr:name

oh, ok.
afaik, there are those virtual properties jcr:name and jcr:path for
this exact reason that exist in the query engine. IIRC, you can only
use them in the ORDER BY clause, if they're explicitly specified in
the select clause.

(i'm not 100% sure if i'm telling the truth here :-)

--
regards, toby



On 4/29/08, Conoly, Brett <[EMAIL PROTECTED]> wrote:
> Sorry, I'm actually trying to use the ORDER BY part of an sql query
and
>  it seems as if it only works on properties.  Ordering by names and
paths
>  seems like it may be a commonly requested function so I was hoping
there
>  may be some easy way to either make the node orderable in the sense
that
>  it can be ordered by name or path or force the name and/or path to be
>  defined as a property so that they can be ordered.
>  Currently I have to get all the nodes I want, order them, and then
get a
>  sublist out of that ordered list in order to get the desired
>  functionality.  Over rmi this is fairly slow and unneeded when there
>  should be a way to get the ORDER BY functionality working on names or
>  paths from the rmi server.
>  I'm just asking if this is possible through node configuration or
>  perhaps a function that I may have missed.
>  Thanks,
>
> Brett
>
>
>  -----Original Message-----
>  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tobias
>  Bocanegra
>  Sent: Tuesday, April 29, 2008 4:10 PM
>  To: users@jackrabbit.apache.org
>  Subject: Re: getProperty and jcr:name
>
>  hi brett,
>  i don't quite understand your question. the 'jcr:name' and 'jcr:path'
>  properties do not exist on a node unless you set them. using
getName()
>  or getPath() is the correct way of retrieving the name or path of an
>  item.
>
>  --
>  regards, toby
>
>
>  On 4/29/08, Conoly, Brett <[EMAIL PROTECTED]> wrote:
>  > I was just writing a comparator for the jcr nodes and in my test
case
>  I
>  >  was comparing the jcr:name and jcr:path properties of the nodes.
I
>  >  realize that there's a getPath and getName function on the nodes
but
>  is
>  >  there any way to get these as properties without it throwing a
>  >  PathNotFoundException?
>  >  Thanks in advance
>

Reply via email to