When you say nested documents, do you mean like a map or set of embedded or 
linked documents?

You can use all the same types in a vertex as you can with a document. 
 Just think of an OrientVertex as a hybrid of a node and a document.  Just 
stick with the Vertex and create edges for it while setting its properties 
like a document.

-Colin

Orient Technologies

The Company behind OrientDB

On Monday, March 23, 2015 at 10:27:04 AM UTC-5, Aris Alexis wrote:
>
> Hi. I am using the setProperty but I want to keep nested documents in that 
> property like options for the user or accounts that are not just list 
> string but maps. Any nice way of doing this with a vertex?
>
> if i use a document object can i create edges for it? because my data is 
> highly connected.
>
> Best Regards,
> Aris Giachnis
>
> On Mon, Mar 23, 2015 at 3:06 PM, Colin <colinl...@gmail.com <javascript:>> 
> wrote:
>
>> Hi Aris,
>>
>> A vertex is not a document but does make use of one internally.  You can 
>> treat a vertex like a document in that you can call setProperty with the 
>> same types that ODocument.field() can use.
>> Do note that save() is implicit when using a vertex.
>>
>> If you don't wish to use OrientVertex objects, you can create ODocument 
>> objects.  To gain access to the underlying Document Database interface via 
>> the Graph Database, just call graph.getRawGraph().
>>
>> Good luck!
>>
>> -Colin
>>
>> Orient Technologies
>>
>> The Company behind OrientDB
>>
>> On Monday, March 23, 2015 at 7:37:06 AM UTC-5, Aris Alexis wrote:
>>>
>>> hi,
>>>
>>> sorry for the noob question but i am using the graph database but some 
>>> vertices i would like them to be documents.
>>> for example the user vertex has a lot of sub documents for the location, 
>>> phones etc.
>>>
>>> can I do in my code ODocument od=vertex? and then how to save it? can I 
>>> use the variables then like od.phones[0] or something?
>>>
>>> do I have to open a new transactional connection to a document database 
>>> or work with my existing connection for graph?
>>>
>>> thanks
>>>
>>>  -- 
>>
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "OrientDB" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/orient-database/tyiGvLaLtuM/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> orient-databa...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
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