Kamil created JCR-3925:
--------------------------
Summary: JCR_SQL2 returns duplicated rows
Key: JCR-3925
URL: https://issues.apache.org/jira/browse/JCR-3925
Project: Jackrabbit Content Repository
Issue Type: Bug
Reporter: Kamil
In my repository I have created few nodes:
{noformat}
/foo
/bar
/bar/child
/bar/child/grandchild
{noformat}
When I execute following code:
{noformat}
NodeIterator nodes = session.getRootNode().getNodes();
while(nodes.hasNext()){
Node n = nodes.nextNode();
System.out.println(String.format("%s: %s", n.getIdentifier(), n));
}
{noformat}
I get:
{noformat}
deadbeef-cafe-babe-cafe-babecafebabe: node /jcr:system
c0457b0d-2113-4d47-aa7c-d150bc74ce16: node /rep:security
ff67a591-52cb-4d37-b826-772fe6611b7e: node /bar
e2a097b1-62b6-4296-ab91-12b06e600ba3: node /rep:accesscontrol
76dbbae0-3b4d-43fc-b5d5-753792e2256b: node /foo
{noformat}
which is correct. But when I invoke:
{noformat}
QueryManager manager = session.getWorkspace().getQueryManager();
Query query = manager.createQuery("SELECT * FROM [nt:unstructured] AS n WHERE
ISCHILDNODE('/')", Query.JCR_SQL2);
NodeIterator res = query.execute().getNodes();
while (res.hasNext()) {
Node n = res.nextNode();
System.out.println(String.format("%s: %s", n.getIdentifier(), n));
}
{noformat}
Nodes are duplicated!
{noformat}
76dbbae0-3b4d-43fc-b5d5-753792e2256b: node /foo
ff67a591-52cb-4d37-b826-772fe6611b7e: node /bar
ff67a591-52cb-4d37-b826-772fe6611b7e: node /bar
76dbbae0-3b4d-43fc-b5d5-753792e2256b: node /foo
{noformat}
Could you please fix that?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)