You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I build this simplified query for show the error
I have a class with hierarchy : parent is the field to trasverse. #93:13 has a child.
but
select from #93:13 let $p = @Rid where scope = #65:1 and @Rid <> #93:14 and ( select count() as count from (traverse parent from #93:13 ) where parent = #93:14 ) contains (count = 0)
is correct
but
select from #93:13 let $p = @Rid where scope = #65:1 and @Rid <> #93:14 and ( select count() as count from (traverse parent from #93:13 ) where parent = $p ) contains (count = 0)
is wrong
the query might give the same result cause in this simplified query $p = #93:13
The text was updated successfully, but these errors were encountered:
contexts are per context of execution, so the sub-query can't see $p created 2 level up. Try this:
selectfrom#93:13
let $p = @rid
where scope =#65:1 and @rid <> #93:14 and (selectcount() as count from (
traverse parent from#93:13
) where parent = $parent.$parent.$p
) contains (count =0)
I build this simplified query for show the error
I have a class with hierarchy : parent is the field to trasverse.
#93:13 has a child.
but
select from #93:13 let $p = @Rid where scope = #65:1 and @Rid <> #93:14 and ( select count() as count from (traverse parent from #93:13 ) where parent = #93:14 ) contains (count = 0)
is correct
but
select from #93:13 let $p = @Rid where scope = #65:1 and @Rid <> #93:14 and ( select count() as count from (traverse parent from #93:13 ) where parent = $p ) contains (count = 0)
is wrong
the query might give the same result cause in this simplified query $p = #93:13
The text was updated successfully, but these errors were encountered: