py563
py563

Reputation: 15

In orientdb what is difference between in('edge_type') and in(edge_type)

Trying this query in Grateful dead database provided in orientdb gives 146 records: select expand(in('sung_by')) from V where name = 'Garcia'

But when we try the similar version of below query: select expand(in(sung_by)) from V where name = 'Garcia', 150 records are returned

Is it a bug?? Just trying orientdb from past week, followed tutorial from this website and this was second issue found.

Upvotes: 1

Views: 53

Answers (1)

Lvca
Lvca

Reputation: 9060

By using select expand(in(sung_by)), the value of the field sung_by is resolved at query execution, but there is no field called sung_by, so it's null.

For this reason, it's like executing select expand(in()) in that case. By using 'sung_by', instead, only the edges with label sung_by will be traversed.

So, put always " or ' around edge's class/label to traverse.

Upvotes: 2

Related Questions