Thank you,
Chris
On Thu, Nov 4, 2010 at 3:36 AM, [Ricardo Rodriguez] eBioTIC. [via XWiki] <
ml-node+5704373-1764624309-299502@n2.nabble.com<ml-node%2B5704373-1764624309-299502@n2.nabble.com>
Sergiu Dumitriu wrote:
On 11/03/2010 07:47 PM, Chris Wagner wrote:
> Hello,
>
> I am having some issues with the "order by" clause in HQL - the
>
following
> query:
>
> $xwiki.searchDocuments("where doc.hidden = false and
doc.id='${doc.parent}'
>
> order by doc.title asc")
>
>
Please, Chris, what this query is designed for? And why do you use
curly
braces to wrap doc.parent?
Thanks!
> is returning the expected set of documents,
but the title order is
>
erratic.
> The documents are reordered, but it is not
alphabetized as anticipated.
> Instead, there are several alphabetized "spurts" -- for example, I have
>
'A',
> 'C', 'P', ... 'A',
'A', 'B', 'C', 'D', 'E', etc. Within one of these
>
spans,
> no items appear out of order, but the
'span' separation is not expected
>
or
desired.
Is there a common issue that I could be overlooking?
There are two types of titles.
Document titles are stored in the database as the doc.title field, and
they are editable in the editor above the content.
Display titles are computed from the document title, first heading from
the content, or the document name, depending on which one exists, in
this order. Unfortunately it is not possible to see the display title in
queries.
I'm not sure, but I think that your problem is caused by this difference
between display and document titles. The first set of documents has an
empty document title, but in the UI you see their computed display
title. The second set of documents is correctly ordered by their
persisted document title.
--
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems
_______________________________________________
users mailing list
[hidden email] <http://user/SendEmail.jtp?type=node&node=5704373&i=0>
http://lists.xwiki.org/mailman/listinfo/users
------------------------------
View message @
http://xwiki.475771.n2.nabble.com/Unexpected-Order-By-Results-tp5702753p570…
To unsubscribe from Unexpected 'Order By' Results, click
here<http://xwiki.475771.n2.nabble.com/template/TplServlet.jtp?tpl=unsub…QxMjEwMQ==>.