[daisy] Query using UserId() doesn't work in navigation tree

Bruno Dumon bruno at outerthought.org
Mon Oct 16 08:24:45 CDT 2006


On Sat, 2006-10-14 at 22:01 +0200, Yves Langisch wrote:
> Hi,
> 
> With the following query I try to get all 'mydoc' documents owned by the 
> current user:
> 
> select name where documentType='mydoc' and ownerId=UserId()
> 
> Trying this query under Tools/Query Search I get a bunch of documents 
> whereas putting the same query into a navigation tree doesn't return any 
> documents. After replacing UserId() with a hardcoded value everything is 
> fine. It looks like the UserId() function doesn't work inside a 
> navigation tree query.
> 
> What's wrong here?

Using the UserId() function in queries embedded in navigation trees
isn't supported. The same holds for any sort of expression which is
context/time related (i.o.w. can vary on each execution).

This is because a navigation tree is build up once and then cached
(shared among users) in the Navigation Manager.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org                          bruno at apache.org



More information about the daisy mailing list