限制in-/outgoing条边from/to条顶点的数量?

Constrain the number of in-/outgoing edges from/to vertex?

目前我有一个class A extends V和一个class B extends E
现在我想限制从 A 出来的 B 边的数量说 2.
这可能吗?如果可能,我该如何实现?
我找不到任何有用的东西,只有 LINK 属性,但我想使用边缘。

您可以尝试使用钩子(相当于 RDBMS 中的触发器)来控制对您的模式的 CRUD 操作:http://www.orientechnologies.com/docs/last/Hook.html.