equal
deleted
inserted
replaced
370 # repositories (eg shingouz) |
370 # repositories (eg shingouz) |
371 cls = dump_class(cls, etype) |
371 cls = dump_class(cls, etype) |
372 cls.__regid__ = etype |
372 cls.__regid__ = etype |
373 cls.__initialize__(self.schema) |
373 cls.__initialize__(self.schema) |
374 return cls |
374 return cls |
|
375 |
|
376 def fetch_attrs(self, targettypes): |
|
377 """return intersection of fetch_attrs of each entity type in |
|
378 `targettypes` |
|
379 """ |
|
380 fetchattrs_list = [] |
|
381 for ttype in targettypes: |
|
382 etypecls = self.etype_class(ttype) |
|
383 fetchattrs_list.append(set(etypecls.fetch_attrs)) |
|
384 return reduce(set.intersection, fetchattrs_list) |
375 |
385 |
376 VRegistry.REGISTRY_FACTORY['etypes'] = ETypeRegistry |
386 VRegistry.REGISTRY_FACTORY['etypes'] = ETypeRegistry |
377 |
387 |
378 |
388 |
379 class ViewsRegistry(CWRegistry): |
389 class ViewsRegistry(CWRegistry): |