I want to do a query in OrientDB but i don't know how it works.
I'm using the Graph API and my DB looks like this:
class(V): @route (Name, Start, Length, Goal)
class(V): @direction (Goal, length)
class(E): @has_A class(E): @start_Direction class(E): @has_Follower
The Edges are connected to the Vertices like this:
route -> has_A -> direction
route -> start_Direction -> direction
direction -> has_Follower -> direction
now i need to find all followers by the name of the route, what works so far is when i enter a rid (of the class startDirection) directly to the query for example:
select * from (traverse outE('has_Follower'),has_Follower.in from #??:?) where @class='direction'
But now i need to get to the rid over the Name of the route (which is the problem), what i tried so far is:
select * from (traverse outE('has_Follower'),has_Follower.in from (select @rid from start_Direction where start_Direction.out = (select @rid from route where Name = 'nameOfroute'))) where @class='direction'
But this gives me an empty query, although when i type in the rid from start_Direction of which i know has a has_Follower it works.
Hope this is understandable, thanks for any help in advance.