2017-12-19 13 views
0

PARAMS 입력으로 저는 두 가지 포인트를 받았습니다 : City1과 City2.
intance에 대해 우리는 City1과 City2 사이에 어떤 서브 루트가 있는지 알아야합니다.내가 DB에서 다음과 같은 구조를 가지고

traverse outE('has_route_to'), has_route_to.in 
from 
(select * from City where Name = 'City1') 

을하지만 그것을 실행하면 나는 City1에서 시티 2로뿐만 아니라, City1에서 모든 경로가 표시됩니다
나는 다음과 같은 쿼리를 쓰고 있어요.


OrientDB에게 말할 수 있습니다. City1과 City2 사이의 모든 포인트 만 표시합니까?

답변

0

이 시도 :

select from route where (Name in (select both('has_route_to').Name from City where Name = "City1")) and (Name in (select both('has_route_to').Name from City where Name = "City2")) 

그것이

감사

+0

감사 미카엘라 희망이 도움, 그 도움이 –

관련 문제