[英]Java - How to create edges on Arangodb?
I created an edge collection using java, but when i try to create a document i get an error on method (insertEdge). 我使用Java创建了一个边缘集合,但是当我尝试创建文档时,在方法(insertEdge)上出现错误。
Does anyone know of another method for doing this, or what I might be doing wrong? 谁知道这样做的另一种方法,或者我做错了什么?
BaseEdgeDocument myObject = new BaseEdgeDocument("TurmaA/asd","TurmaA/testepedro");
myObject.addAttribute(nome.getField(), nome.getValue());
collection.insertEdge(myObject, new EdgeCreateOptions());
PS- the error given is a "cannot find symbol (method)" PS-给出的错误是“找不到符号(方法)”
When reading about cannot find symbol your object ( collection
) which you're trying to invoke the insertEdge
method on probably isn't of type edge collection
- hence it doesn't have insertEdge-method
. 当读到有关找不到符号的信息时,您尝试调用
insertEdge
方法的对象( collection
)可能不是edge collection
类型-因此它没有insertEdge-method
。
The example code shows how to work with edge collections : 示例代码显示了如何使用边缘集合 :
private static EdgeEntity saveEdge(final CircleEdge edge) throws ArangoDBException {
return db.graph(GRAPH_NAME).edgeCollection(EDGE_COLLECTION_NAME).insertEdge(edge);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.