Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Graph 从结果中排除父顶点_Graph_Orientdb - Fatal编程技术网

Graph 从结果中排除父顶点

Graph 从结果中排除父顶点,graph,orientdb,Graph,Orientdb,我有一个简单的图表,其中有一个家长和三个孩子: 查询子对象时,我还返回父对象: select name from ( traverse in() from ( select from group where name = 'Parent' ) ) 结果: name Parent Child 1 Child 2 Child 3 如何从查询结果中排除父级?我不希望在我的应用程序代码中处理结果 谢谢。排除深度为零的位置似乎可以做到: select name f

我有一个简单的图表,其中有一个家长和三个孩子:

查询子对象时,我还返回父对象:

select name
from (
  traverse in()
  from (
    select
    from group
    where name = 'Parent'
  )
)
结果:

name
Parent
Child 1
Child 2
Child 3
如何从查询结果中排除父级?我不希望在我的应用程序代码中处理结果


谢谢。

排除深度为零的位置似乎可以做到:

select name
from (
  traverse in()
  from (
    select
    from group
    where name = 'Parent'
  )
)
where $depth > 0
结果:

name
Child 1
Child 2
Child 3

要仅获取子项名称,我建议使用如下查询:

select in('belongsTo').name as Name from Group where name = "Parent" unwind Name

嗨@Adrian,你有机会尝试我的解决方案吗?