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
Our database returns wrong results for the following query:
select expand($courses) from Activity let courses = (select from $current.in_ContainsActivity.out) where id = 809
The query returns a record with the class "Course", and id = 67
However, if you follow the in_ContainsActivity.out link from Activity where id = 809, the record that should be returned has id = 54
Thanks @luigidellaquila for the response. Our understanding was that in this particular case, $current refers to the current record set in the top level query. Interestingly, this used match exactly with our understanding up until 2.1.x! We have to use projection because we are doing further sub queries. I had just posted the simplified query to help debugging :)
👍 for your help!
Just to give you all the info, $current variable refers to the current record in current (sub) query. If you want to access the parent query context you can use $parent variable, eg. $parent.$current refers to the current record in parent query. You can also use it at multiple levels, eg. $parent.$parent.$current.
I guess I can close this issue, please reopen if you need further help
OrientDB Version: 2.2.17
Our database returns wrong results for the following query:
select expand($courses) from Activity let courses = (select from $current.in_ContainsActivity.out) where id = 809
The query returns a record with the class "Course", and id = 67
However, if you follow the in_ContainsActivity.out link from Activity where id = 809, the record that should be returned has id = 54
I've uploaded an export of our test database where this issue occurs:
https://drive.google.com/file/d/0B_TS9oS4-Fi2UDh4b0VxbU1NbHc/view?usp=sharing
The text was updated successfully, but these errors were encountered: