Hi.

Is there a way to run a gremlin query starting with vertices of a class 
including subclasses?
To iterate over just the base class, I am able to use g.V("@class", 
"Base"), but this does not include any subclasses:

-=- Leonid

PS. Here's the test case:

orientdb {db=test}> create class A extends V
orientdb {db=test}> create class B extends A
orientdb {db=test}> create class C extends A
orientdb {db=test}> create vertex B
Created vertex 'B#12:0 v1' in 0.002000 sec(s).
orientdb {db=test}> create vertex C
Created vertex 'C#13:0 v1' in 0.001000 sec(s).
orientdb {db=test}> select from A
----+-----+------
#   |@RID |@CLASS
----+-----+------
0   |#12:0|B     
1   |#13:0|C     
----+-----+------

2 item(s) found. Query executed in 0.003 sec(s).
orientdb {db=test}> gremlin g.V("@class", "A")
[Started multi-line command. Type just 'end' to finish and execute]
orientdb {db=test}> end

[]

Script executed in 0.000000 sec(s).
orientdb {db=test}> gremlin g.V("@class", "B")
[Started multi-line command. Type just 'end' to finish and execute]
orientdb {db=test}> end

B#12:0 v1

Script executed in 0.000000 sec(s).

-- 

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