Hi Carsten,

You can set ODocuments into properties of vertexes and edges.

part.setProperty("subItems", subItem),
or collections of Documents
part.setProperty("subitems", Arrays.asList(subItem))



Best regards,
Artem Orobets

* Orient Technologiesthe Company behind OrientDB*


2014-07-11 9:32 GMT+03:00 Carsten Zerbst <[email protected]>:

> Hello All,
>
> I'm using the Graph API to create vertexes and links.
>
> Now I'd like to add a list of objects to a vertex. The best I managed so
> far is using a set off
> Strings with manuall serialization / deserialization:
>
> OrientVertex part = graph.addVertex( "MyClass", (String) null );
> String uuid = UUID.randomUUID().toString();
> part.setProperty( DB_MVPM_UUID, uuid );
>
> ODocument subItem = new ODocument();
> // put some fields into subItem
> Set<String> subItems = new HashSet<String>();
> subItems.add( subItem.toJSON());
>
> part.setPropert("subItems", subItems),
>
>
> Is there a direct way  ?
>
> Bye, Carsten
>
>  --
>
> ---
> 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/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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to