But the question still stands - this example is great assuming I have a
history of logs I want to insert into the database all at once, but of
course log entries are being generated all the time. Can I insert a new one
into the structure above at runtime? via sql or java API?
Can I insert an empty hashmap and populate that later?
OrientVertexType logVertex= graph.createVertexType("log");
logVertex.createProperty("priority", OType.STRING);
//---- link log and hour ----
OrientVertexType hourVertex = graph.createVertexType("hour");
hourVertex.createProperty("logs", OType.LINKSET, logVertex);
Map<String, OrientVertex> hours = new HashMap<>();
//add all the hours in a day
for(int i = 0; i < 24; i++)
{
OrientVertex hour = graph.addVertex("class:hour");
hour.setProperty("logs", hours);
//cannot populate yet as the data does not exist
}
--
---
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.