Hi Mihai,
to create a cluster with java api you can use the following code
OClass cl=g.createVertexType("Customer");
cl.createProperty("name", OType.STRING);
cl.addCluster("usa_customer");
cl.addCluster("china_customer");
while to insert a record in a specific cluster you can use this code
OrientVertex v1=g.addVertex("Customer","china_customer");
v1.setProperty("name","Alessandro");
or
OrientVertex c1=g.addVertex("Customer");
c1.setProperty("name","Alessandro");
c1.moveTo("Customer", "usa_customer");
Hope it helps.
--
---
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.