jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edouard Hue (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-2846) Child/descendant constraints and join conditions are not consistent in handling of cloned shared nodes
Date Wed, 15 Dec 2010 10:19:02 GMT

     [ https://issues.apache.org/jira/browse/JCR-2846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Edouard Hue updated JCR-2846:
-----------------------------

    Attachment: SharedNodeQueryTest.java

Test case that demonstrates the issue. All tests pass but testChildClonedNodeJoinQuery() and
testDescendantClonedNodeJoinQuery(). These tests use ISCHILDNODE and ISDESCENDANTNODE constraints
on cloned shared nodes.

> Child/descendant constraints and join conditions are not consistent in handling of cloned
shared nodes
> ------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-2846
>                 URL: https://issues.apache.org/jira/browse/JCR-2846
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 2.2.1
>            Reporter: Edouard Hue
>         Attachments: SharedNodeQueryTest.java
>
>
> Given this repository tree :
> /A1/X
> /A2/X
> /A1 and /A2 being of type t:a
> /A1/X being a shareable node of type t:x
> /A2/X being a clone of /A1/X (ie /A1/X and /A2/X belong to the same share set)
> Queries for child or descendant nodes of /A1 or /A2 and of type t:x work OK :
> - select x.* from [t:x] as x where ischildnode(x, [/A1]) returns /A1/X
> - select x.* from [t:x] as x where isdescendantnode(x, [/A1]) returns /A1/X
> - select x.* from [t:x] as x where ischildnode(x, [/A2]) returns /A2/X
> - select x.* from [t:x] as x where isdescendantnode(x, [/A2]) returns /A2/X
> Queries for nodes of types t:a and t:x with a join condition on ischildnode (t:x, t:a)
or isdescendantnode(t:x, t:a) are inconsistent :
> - select x.*, a.* from [t:x] as x inner join [t:a] as a on ischildnode(x, a) where issamenode(a,
[/A1]) returns /A1/X (OK)
> - select x.*, a.* from [t:x] as x inner join [t:a] as a on ischildnode(x, a) where issamenode(a,
[/A2]) returns nothing (NOK, should return /A2/X)
> - select x.*, a.* from [t:x] as x inner join [t:a] as a on isdescendantnode(x, a) where
issamenode(a, [/A1]) returns /A1/X (OK)
> - select x.*, a.* from [t:x] as x inner join [t:a] as a on isdescendantnode(x, a) where
issamenode(a, [/A2]) returns nothing (NOK, should return /A2/X)
> It looks like nodes in a shared set that are not the original node (the node that was
cloned) are ignored by the ISCHILDNODE and ISDESCENDANTNODE join conditions, whereas they
are taken in account in constraints.

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


Mime
View raw message