[ 
https://issues.apache.org/jira/browse/JCR-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548646
 ] 

Kaizer commented on JCR-1198:
-----------------------------

This issue seems to be bigger than I thought. Right now objects are retrieved 
just below one level of the scope set. E.g. after applying the patch 
TestGetObjectsAnywhereInPath.patch in the method if we change the scope from 
"/folder/test/" to "/folder/" it just retrieves 4 objects and does not retrieve 
the one under /folder/test/test1.

This has happened after this issue was fixed.

In QueryManagerImpl.buildJCRExpression method if I change 
        if (((filter.getScope() != null) && (!filter.getScope().equals("")))) {
            jcrExp += "/jcr:root" + filter.getScope() + "element(" + 
filter.getNodeName() + ", ";
        }
to
        if (((filter.getScope() != null) && (!filter.getScope().equals("")))) {
            if(filter.getNodeName().equals("*"))
                filter.setScope(filter.getScope() + "/");
            jcrExp += "/jcr:root" + filter.getScope() + "element(" + 
filter.getNodeName() + ", ";
        }
it works fine. Although this looks more like a hack to me but nevertheless all 
the test cases (including new one) pass.

If there is a better way to accomplish this (not changing QueryManagerImpl 
code) then do let me know.

> Issue while loading list of classes at that path itself.
> --------------------------------------------------------
>
>                 Key: JCR-1198
>                 URL: https://issues.apache.org/jira/browse/JCR-1198
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jcr-mapping
>         Environment: Windows XP
>            Reporter: Kaizer
>            Assignee: Christophe Lombart
>            Priority: Critical
>         Attachments: JCR-1198.zip, TestGetObjectsAnywhereInPath.patch
>
>
> Hi,
> I cannot retrieve list of objects that are directly under the path that they 
> were saved in. I did not know where to simulate this issue and hence I have 
> used DigesterSimpleQueryTest. I have attached the path for the newly added 
> test case testObjectListRetrievalAtBasePath. In case the patch is not up to 
> the mark I have attached the modified file too.
> Instead of creating Page in /test if I create it in /sample/test and search 
> in /sample/test it returns nothing but if I search in /sample it would return 
> the object.
> Another important point here is that it is causing issues while retrieving 
> Page class, the other test cases that are retrieving Paragraph class 
> (embedded inside Page class) are still working fine!
> Regards,
> Kaizer

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to