I am developing a system where (for example):

*Vertices*
Entity extends V
Document extends Entity
Node extends Entity
Country extends Node
Language extends Node
... more vertices can be created during run time but they all extend from 
the core Entity class or another class that already exists

*Edges*
ContainedIn extends E

For example, I want to get a tree structure from a root vertex (17:0) using 
the 'ContainedIn' edge.  I only want the vertexes that are of the 'Node' 
type.  That mean I want back any Node, Country, or Language, or any other 
vertex that has Node as a parent.  If there was only a known set of 
possible types, I would simply put in a where clause that checks against a 
list of @class types.  Unfortunately, since new classes can and will be 
created by the end user I might not know all the classes that inherit from 
Node.

*What I know can be done:*
select @rid, Id, Name_ENG, $path from (traverse in('ContainedIn') from 17:0 
where $depth < 4) where @class in ["Node", "Language", "Country"]
 
*What I would like to do:*
select @rid, Id, Name_ENG, $path from (traverse in('ContainedIn') from 17:0 
where $depth < 4) where *@class inheritsFrom "Node"*

Does anyone have any recommendations on how to build such a query?

-- 

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