Hi Joao,
this is an example of code for Embedded List from java api
OrientGraph g=new OrientGraph(currentPath);
OClass cl=g.createVertexType("Person", "V");
cl.createProperty("name", OType.STRING);
cl.createProperty("lista", OType.EMBEDDEDLIST);
List<Auto> lista1=new ArrayList<Auto>();
lista1.add(new Auto("Ferrari"));
lista1.add(new Auto("Lamborghini"));
Gson gson = new Gson();
String json = gson.toJson(lista1);
OrientVertex v1=g.addVertex("class:Person");
v1.setProperties("name","alessandro");
v1.setProperties("lista",json);
g.shutdown();
Regards,
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.