Well, with either approach you're actually using the Graph API once you 
start using the OrientGraph object.

A Vertex (OrientVertex) is built on top of a document, and its ODocument 
can be obtained by calling vertex.getRecord().

But an ODocument is not a Vertex.

By working with OrientVertex objects, you essentially get the best of both 
worlds.

If you don't need the automatic management of links, then ODocument is just 
fine.

-Colin 

Orient Technologies

The Company behind OrientDB



On Friday, March 6, 2015 at 5:04:43 AM UTC-6, Christian C wrote:
>
> Actually the better approach for me is to stick with the document api and 
> do like so:
>
> ODatabaseDocumentTx db = pool.acquire();
> OrientGraph g = new OrientGraph(db);
>
>
> Out of interest is the a way to cast ODocument to Vertex and vice versa?
>
>
> PS Would be nice if you could provide a one liner in the wiki for the 
> Document API and for the Graph API how to get the otherone. This my help new 
> commers a lot.
>
>

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to