Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.2.1
-
None
-
None
Description
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.