I have a class that contains a LINKMAP field called links. This class is 
used recursively to create arbitrary hierarchical groupings (something like 
the time-series example, but not with the fixed year/month/day structure).

A query like this:

select expand(links['2017'].links['07'].links['15'].links['10'].links) from 
data where key='AAA'

Returns the actual records contained in the last layer of "links". This 
works exactly as expected.


But a query like this (note the 10,11 in the second to last layer of 
"links"):

select expand(links['2017'].links['07'].links['15'].links['10','11'].links) 
from data where key='AAA'

Returns two rows of the last layer of "links" instead:

{"1000":"#23:0","1001":"#24:0","1002":"#23:1"}
{"1003":"#24:1","1004":"#23:2"}


Using unionAll or intersect (with or without UNWIND) results in this single 
record:

[{"1000":"#23:0","1001":"#24:0","1002":"#23:1"},{"1003":"#24:1","1004":"#23:2"}]


But nothing I've tried (including various attempts at "compound" SELECTs) 
will get the expand to work as it does with the original example (i.e. 
return the actual records represented in the last LINKMAP).

Is there a SQL syntax that will achieve this?

-- 

--- 
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.

Reply via email to