Hi,
this is an example with graph database
OrientGraph g=new OrientGraph(currentPath);
OClass p=g.createVertexType("Person", "V");
p.createProperty("name", OType.STRING);
p.createProperty("lista", OType.LINKLIST);
OClass c=g.createVertexType("Contract", "V");
c.createProperty("name", OType.STRING);
OrientVertex v2=g.addVertex("class:Contract");
v2.setProperties("name","contratto 1");
OrientVertex v1=g.addVertex("class:Person");
v1.setProperties("name","alessandro");
List<OIdentifiable> linklist = new ArrayList<OIdentifiable>();
linklist.add(v2);
v1.setProperties("lista",linklist);
g.shutdown();
I hope I have helped you
Alessandro
--
---
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.