orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

Traversing direction matters and produces different results in latest 3.0.x

Open andreyvk opened this issue 4 years ago • 0 comments

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): image

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) image

andreyvk avatar Jan 14 '21 16:01 andreyvk