OrientDb-获取节点及其所有关系

OrientDb-获取节点及其所有关系,orientdb,orientdb-2.1,Orientdb,Orientdb 2.1,我可以做一个查询来获得顶点和他的所有边,包括其他顶点吗 现在,我正在执行多个查询以实现它: 要获取顶点,请执行以下操作: select from V where entity_name = 'SomeEntity' 然后遍历每条边并选择它: select from #EDGE@rid // Multiple in the number of edges for this node 在结束时,越过边缘,得到除原始顶点以外的所有其他顶点 select from #VERTEX@rid // Mu

我可以做一个查询来获得顶点和他的所有边,包括其他顶点吗

现在,我正在执行多个查询以实现它:

要获取顶点,请执行以下操作:

select from V where entity_name = 'SomeEntity'
然后遍历每条边并选择它:

select from #EDGE@rid // Multiple in the number of edges for this node
在结束时,越过边缘,得到除原始顶点以外的所有其他顶点

select from #VERTEX@rid // Multiple in the number of vertexes in the edges

我使用以下方法从顶点获取所需深度的所有顶点和边:

TRAVERSE inE(), outE(), inV(), outV() 
FROM (select from V where entity_name = 'SomeEntity') 
WHILE $depth <= 2

我使用以下方法从顶点获取所需深度的所有顶点和边:

TRAVERSE inE(), outE(), inV(), outV() 
FROM (select from V where entity_name = 'SomeEntity') 
WHILE $depth <= 2

此查询还返回边的ID,而不是这些边的完整实例,我认为TRAVERSE是解决方案。此查询还返回边的ID,而不是这些边的完整实例,我认为TRAVERSE是解决方案。