diff -r a448e470c150 -r c281afe35b8b cwvreg.py --- a/cwvreg.py Tue May 03 11:02:32 2011 +0200 +++ b/cwvreg.py Wed May 04 10:32:15 2011 +0200 @@ -373,6 +373,16 @@ cls.__initialize__(self.schema) return cls + def fetch_attrs(self, targettypes): + """return intersection of fetch_attrs of each entity type in + `targettypes` + """ + fetchattrs_list = [] + for ttype in targettypes: + etypecls = self.etype_class(ttype) + fetchattrs_list.append(set(etypecls.fetch_attrs)) + return reduce(set.intersection, fetchattrs_list) + VRegistry.REGISTRY_FACTORY['etypes'] = ETypeRegistry