cwvreg.py
changeset 2824 3455f72010fe
parent 2818 326375561412
child 2829 054a8805da52
--- a/cwvreg.py	Thu Aug 13 12:18:37 2009 +0200
+++ b/cwvreg.py	Thu Aug 13 12:18:55 2009 +0200
@@ -105,6 +105,13 @@
         super(ETypeRegistry, self).register(obj, **kwargs)
 
     @cached
+    def parent_classes(self, etype):
+        eschema = self.schema.eschema(etype)
+        parents = [cls.etype_class(e.type) for e in eschema.ancestors()]
+        parents.append(self.etype_class('Any'))
+        return parents
+
+    @cached
     def etype_class(self, etype):
         """return an entity class for the given entity type.