We finally found the answer to our question by reviewing the source code
for OrientVertex. The vertex can be loaded using the getVertex method and
passing the record ID. Then once we have the two vertices we can use the
addEge method to construct the edge.
OrientVertex leftNode = db.getVertex(leftOrid);
OrientVertex rightNode = db.getVertex(rightOrid);
On Tuesday, February 18, 2014 4:50:54 PM UTC-5, Odysseas wrote:
>
>
> This should probably be an easy question. I need to load two vertices into
> memory and create an edge between them. We are shifting our application
> from the old graph API and trying to use blueprints and sometimes the
> underlying ODocument APi to eliminate all dependencies on the old graph API.
>
> We used to be able to do load each node using the record ID and then
> create an edge between them. The problem we are running into is that the
> only method we have found that allows us to load a node by the record ID is
> available only through the rawGraph implementation and returns an instance
> of ODocument. On the other hand then Blueprints API requires two vertices
> in order to do a vertex1.addEdge(vertex2) operation. We have looked
> everywhere and can't find a way to do this. Can you please help.
>
> Thanks,
> Odysseas
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.