0
即时工作现在对边缘问题。
我创建以曲线这个边缘型无交易:OrientDB边缘类继承被忽略
this.graph.createEdgeType("edge", null);
所以有现在是边缘型edge
与父E
。
现在当我创建创建边缘类型的边缘(与交易图):
Edge edge = this.graph.addEdge("class:edge", outVertex, inVertex, "example");
,并添加属性给它:
edge.setProperty("property", "example");
他正在创造一个新的类example
为的E
子类:
WARNING: Committing the active transaction to create the new type 'example'
as subclass of 'E'. The transaction will be reopen right after that.
To avoid this behavior create the classes outside the transaction.
他为什么不走,我作为superclas创建了edge
类型s 的example
边缘?
他为什么创建一个新类型作为E
的子类?这里
this.graph.createVertexType("person", null);
Vertex vertex = this.graph.addVertex("class:person", null, "person");
vertex.setProperty("name", "peter");
没有问题:
我做同样的事情与顶点,但不同的是它的工作原理。
这是一个低质量的答案。请提供补充说明,否则可能会被删除。 –
好吧,我明白他的意思(多态)。 – Mulgard