Hi Simon,I have created an example.OrientVertexType log= graph.createVertexType("log");log.createProperty("priority", OType.STRING);Map<String, OrientVertex> logs = new HashMap<>();OrientVertex log1=graph.addVertex("class:log");OrientVertex log2=graph.addVertex("class:log");log1.setProperty("priority", "high");log2.setProperty("priority", "medium");logs.put("log1", log1);logs.put("log2", log2);Map<String, OrientVertex> logs2 = new HashMap<>();OrientVertex log3=graph.addVertex("class:log");OrientVertex log4=graph.addVertex("class:log");log3.setProperty("priority", "medium");log4.setProperty("priority", "low");logs2.put("log1", log3);logs2.put("log2", log4);//link log and hourOrientVertexType hour = graph.createVertexType("hour");hour.createProperty("logs", OType.LINKSET, log);OrientVertex ora10=graph.addVertex("class:hour");OrientVertex ora20 = graph.addVertex("class:hour");ora10.setProperty("logs",logs);ora20.setProperty("logs",logs2);Map<String, OrientVertex> ore = new HashMap<>();ore.put("10", ora10);ore.put("20", ora20);// link day with hourOrientVertexType day = graph.createVertexType("day");
day.createProperty("hour", OType.LINKMAP, hour);
OrientVertex day25=graph.addVertex("class:day");day25.setProperty("hour",ore);Map<String, OrientVertex> days = new HashMap<>();days.put("25", day25);// link month with dayOrientVertexType month = graph.createVertexType("month");
month.createProperty("day", OType.LINKMAP, day);
OrientVertex month3=graph.addVertex("class:month");month3.setProperty("day",days);Map<String, OrientVertex> months = new HashMap<>();months.put("3", month3);// link year with monthOrientVertexType year = graph.createVertexType("year");
year.createProperty("month", OType.LINKMAP, month);
OrientVertex year2015=graph.addVertex("class:year");year2015.setProperty("month",months);you can try this query: select month[3].day[25].hour[10].logs from year
--
---
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
or select expand (logentry) from (select month[10].day[12].hour[16].log as logentry from #1756:0)
(#12:0 is the rid of the year, #11:0 is the rid of the log)