[英]Multiple traverse via same edge collection in ArangoDB 2.8
Have one edge collection for Product->Model->Brand graphs 为Product-> Model-> Brand图表设置一个边缘集合
FOR m IN INBOUND "BrandModel/49798592791" BrandModelLink
FOR p IN INBOUND m._id BrandModelLink
RETURN { model: m, product: p }
Result - empty. 结果 - 空。 Its restriction forever or beta period?
它的限制永远还是beta期?
Now I use selfmake combination like 现在我使用selfmake组合
FOR m IN INBOUND "BrandModel/49798592791" BrandModelLink
FOR plink IN BrandModelLink
FILTER plink._to == m._id
FOR p IN Product
FILTER p._id == plink._from
RETURN { model: m, product: p }
Hope the first option will work in the final version. 希望第一个选项适用于最终版本。
PS Simplify AQL traverse its just powerful and amazing feature! PS Simplify AQL遍历其强大而神奇的功能!
there should be no restriction about using the same collection in multiple traverse statements, neither in beta nor after. 在多个遍历语句中使用相同的集合应该没有限制,无论是在beta还是在之后。
It seems to be an issue with the _id
to continue traversing. 这似乎是
_id
继续遍历的问题。 This is a bug in beta and will be fixed for 2.8 final. 这是测试版中的一个错误,最终将修复为2.8。
For now could you simply try to remove the _id
in the second filter statement: 现在你可以简单地尝试删除第二个过滤语句中的
_id
:
FOR m IN INBOUND "BrandModel/49798592791" BrandModelLink
FOR p IN INBOUND m BrandModelLink
RETURN { model: m, product: p }
It is possible to use a complete document (vertex) as starting point for traversal as well. 也可以使用完整文档(顶点)作为遍历的起始点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.