Hi Luigi,
The edges go from parent to child so the 'scopeEdge' comes out of (a) and
goes in to (b). File and folder are not separate classes.
They are both a plain vertex.
The file property is a boolean value. I was thinking the existence of the
property could indicate it is a file.
I'll try your suggestions now.
On Monday, June 19, 2017 at 9:15:01 AM UTC-4, Erik T wrote:
>
> I have a tree with 5 vertices
>
> Folder (a)
> / \
> (b) File Folder (c)
> / \
> (d) File Folder (e)
>
> I would like to retrieve the folders that contain a file. So I want to get
> back (a) and (c) from my query. The edges are lightweight edges and are
> labeled 'scopeEdge'. I placed a property on the files in my tree and
> labeled them 'file'. These queries don't work
>
> select out from V where file is not null --> gives back temporary vertices
>
> select from V where out('scopeEdge').file is not null --> gives back (a),
> (b), (c), (d), and (e)
>
> I can get 1 query to work but its really complicated. It makes me think
> I'm doing something wrong. Is there something easier than this?
>
> SELECT FROM (TRAVERSE in('scopedEdge') FROM (SELECT FROM #RID# WHERE file IS
> NOT NULL)) WHERE $depth > 0 --> gives back (a) and (c)
>
>
>
>
--
---
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.