orientdb
orientdb copied to clipboard
Traversing direction matters and produces different results in latest 3.0.x
OrientDB Version: 3.0.15
OS: Ubuntu 18
Hi there,
We have smth weird happening when running queries:
Background: there are Invoice and Company records. Each invoice can have multiple companies connected to it through an incoming has_a
edge. In the same fashion each company can be connected to one or more invoices through an outgoing has_a
edge.
QUERY 1
select from (select expand (inE('has_a').asList()[type='Invoice'].outV()[@class='Company']) from Invoice where id = "62470d52-f4ae-478b-8baa-30314a4b73a6") where @rid = #34:7000
Expected Result: a single company record connected to invoice with id 62470d52-f4ae-478b-8baa-30314a4b73a6
identified by rid #34:7000
Actual Result (correct):
QUERY 2
select from (select expand(outE('has_a').asList()[type='Invoice'].inV()) from #34:7000) where id = "62470d52-f4ae-478b-8baa-30314a4b73a6"
Expected Result
A single invoice record with id 62470d52-f4ae-478b-8baa-30314a4b73a6
connected to company #34:7000
Actual Result (incorrect)