On Friday, July 31, 2015 at 10:20:08 PM UTC+2, Chris Whalen wrote:
>
> I don't disagree.  Normally, I would not expect a RDB request to return 
> this information but due to orientdb's polymorphism capabilities I think it 
> would be reasonable.  As my schema is not static, I cannot rely on a java 
> object to determine a class' ancestors; new sub classes will be defined 
> during run time
>

For this purpose I maintain a »classes-Object« which is updated whenever a 
class is created or removed. Then there is a method to get the 
class-hierarchy of the database, based on the object-root
https://github.com/topofocus/active-orient/blob/master/lib/rest.rb rows 
160-220

If you want to go the other way, just define a method 'superClass' for 
every fetched Object. Then Method.superClass.superClass.(...) reveals the 
hole tree of the corresponding ruby-objects. 
Realisation in Ruby: 
https://github.com/topofocus/active-orient/blob/master/lib/model.rb rows 
56-60


 

-- 

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