Hi group,
Been messing around with OrientDB for a while now, and I've done quite a number of queries in their SQL, but I cannot get real graph traversal to work. In the attachment is a graph structure that I have in my database, and I'm trying to traverse the yellow line.
My thinking is, I could start with a project (
_id = 14) then traverse my way to the connected items?
I have been doing things like the below, but I either get only one item, none, or projects – I don’t want projects, as I was trying to get items.
traverse TYPE_Project.RELATIONSHIP_scopes, TYPE_PermissionNode.RELATIONSHIP_observedBy from (select * from type_project where _id) LIMIT 10 // returns project 14
SELECT expand(out('RELATIONSHIP_observedBy')) FROM (
SELECT expand(out('RELATIONSHIP_scopes')) from TYPE_Project WHERE TYPE_Project._id = 14
) limit 10 // returns nothing
select * from (
traverse TYPE_Project.RELATIONSHIP_scopes, TYPE_PermissionNode.RELATIONSHIP_observedBy from (
select from TYPE_Project WHERE _id = 14
) while $depth <= 3 and (@class = 'TYPE_Item')
) where @class = 'TYPE_Item' // returns nothing
(and so on and so forth, I’ve tried many things, I must just not be getting it)
So: how do I traverse this graph?
Your help much appreciated!
Thank you! Sander.