entity.py
branchtls-sprint
changeset 1471 c889c3bcf5ec
parent 1435 6cd6172718bb
child 1474 716f0742ee7f
--- a/entity.py	Fri Apr 24 09:56:19 2009 +0200
+++ b/entity.py	Fri Apr 24 15:37:05 2009 +0200
@@ -59,7 +59,7 @@
                 AutomaticEntityForm.rinlined.set_rtag(True, rtype, role, stype, otype)
             else:
                 raise ValueError(tag)
-            
+
 except ImportError:
     AutomaticEntityForm = None
     
@@ -277,6 +277,13 @@
                 orderby.append(orderterm)
         return selection, orderby, restrictions
 
+    @classmethod
+    @cached
+    def parent_classes(cls):
+        parents = [cls.vreg.etype_class(e.type) for e in cls.e_schema.ancestors()]
+        parents.append(cls.vreg.etype_class('Any'))
+        return parents
+
     def __init__(self, req, rset=None, row=None, col=0):
         AppRsetObject.__init__(self, req, rset, row, col)
         dict.__init__(self)