--- 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.
--- a/entity.py Thu Aug 13 12:18:37 2009 +0200
+++ b/entity.py Thu Aug 13 12:18:55 2009 +0200
@@ -267,14 +267,6 @@
@classmethod
@cached
- def parent_classes(cls):
- parents = [cls.vreg['etypes'].etype_class(e.type)
- for e in cls.e_schema.ancestors()]
- parents.append(cls.vreg['etypes'].etype_class('Any'))
- return parents
-
- @classmethod
- @cached
def _rest_attr_info(cls):
mainattr, needcheck = 'eid', True
if cls.rest_attr: